-
Notifications
You must be signed in to change notification settings - Fork 131
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
report_results.csh: clone Test-Results.wiki with --depth=1
#492
Comments
@phil-blain, what is the motivation for implementing a "shortcut" to the clone of the test-results wiki. That takes a few seconds in my experience. Having said that, I agree we don't need the full history and maybe setting --depth=1 would be an improvement. With regard to the password, I've handled this for my logins by adding [credential "https://github.com/CICE-Consortium/Test-Results.wiki.git"] to my .gitconfig file on several platforms. This remembers the password after the first time. That is supporting all the weekend automated testing and automatically pushes the results to the wiki page quite nicely. |
I guess the motivation would be that as time passes the clone inevitably takes more and more time. I think I've never used any Git credential helpers, I always use SSH... Reading https://git-scm.com/docs/git-credential-store it appears your username and password are stored unencrypted on the filesystem, so I guess if you trust root on all systems that is OK... (and using unencrypted SSH keys also means you trust root so the situation would be the same with an SSH URL)... |
I agree there are questions of security, and it's something I think about. I do think the ssh version has the same issues as the credentials. I am inclined to stick with the current implementation and use credentials as the workaround. Making ssh the default would create some extra work during setup. And adding an ssh option to cice.setup seems to add complexity without a lot of benefit, but I am open. It would not be that hard to do. |
Yes. I agree: no need to add complexity. I'll refocus the title of the issue to just mention |
--depth=1
--depth=1
--depth=1
Add warning messages when multiple set options overlap (CICE-Consortium#243) Fix namelist output diagnostic for atmbndy (CICE-Consortium#493) Modify git clone in script to use --depth=1 (CICE-Consortium#492)
…ut, script warning messages for --set conflicts (#494) * Add support for .cice_set (#464) Add warning messages when multiple set options overlap (#243) Fix namelist output diagnostic for atmbndy (#493) Modify git clone in script to use --depth=1 (#492) * update doc precedence * update documentation, add info about .cice_set format Co-authored-by: Philippe Blain <levraiphilippeblain@gmail.com>
Added --depth=1 in #494 for git clone when used in test results reporting as well as in code coverage stuff. |
For posterity: you can make Git use an SSH URL even if the hardcoded URL in git config --global url.git@github.com:.insteadOf https://github.com/ This affects all repository cloned from GitHub. |
Given the recent changes with the authentication at github. Does this still work? I tried committing some results from my laptop, but I don't have the right authentication here and I was not allowed to use the standard username / password. What is the latest on this? |
@dabail10, what recent changes and what problems are you having? I generally don't have problems pushing test results to the wiki without an ssh key. Is that the problem you're having? |
I think the problem is that I have an ssh key on derecho somewhere and that still works. I do not have one on my laptop. I was confused about how to generate this again. I wondered if I could just copy from derecho? |
I don't think you can copy from Derecho. github documentation about ssh keys is https://docs.github.com/en/authentication/connecting-to-github-with-ssh I am testing myself from my desktop, no ssh key. This has worked in the past, lets see if it doesn't now. Will also check to see if write permission is set differently for us in the repo. |
report_results works fine for me, just tested from my mac desktop now (conda macos), https://github.com/CICE-Consortium/Test-Results/wiki/cice_by_hash. I don't have an ssh key defined. Also, I checked permissions, I think you should be able to write to the test results wiki. I am running the test suite with ./cice.setup --suite travis_suite -m conda -e macos --testid t01 --bgen default --bcmp default --bdir ${basedir} --report What error are you getting? |
Interesting. I am running the report_results.csh script manually. Then github is asking for my userid and passwd, but it won't allow that. So, perhaps there is something else done when you do the --report option? |
Maybe it is related to what @phil-blain was saying above. |
I don't think the --report is doing anything special. report_results.csh manually should work too. What error are you getting? And what issue are you referring to from above? Also, I checkout with git clone https://github.com/cice-consortium/CICE cice.master.${date} --recursive and I have the following in .gitconfig, [push] [credential "https://github.com/CICE-Consortium/Test-Results.wiki.git"] [credential] Maybe it's how you're checking out the repo or your config settings? |
All I have in .gitconfig is my email and name. This is the error. Does it ask you for a userid and password? I think you have to have keys stored. ./report_results.csh: Running results.csh |
As the message says, support for password authentication for Git HTTPS operations was removed by GitHub a while ago. You need to create a personal access token, which you put in instead of your password. It's explained on the linked help page. Probably the script works for Tony because the token is what is recorded by the "store" credential-helper. |
That's what I was thinking. I was trying to remember what I did on derecho / cheyenne awhile back. |
I just figured it out! I coped .gitconfig and .git-credentials from derecho over to my Mac and it works now! |
It would be nice if the
report_results.csh
script would allow using an already existing clone of Test-Results.wiki repo, and just fetch the latests commits instead of always cloning the full repo.Or, if we stick of a full clone, just clone the latest commit (
--depth=1
) since we do not need the full history.Also, it would be nice if there was an option to use the SSH url
git@github.com:CICE-Consortium/Test-Results.wiki.git
so that pushing would not required a password.The text was updated successfully, but these errors were encountered: