glide
glide copied to clipboard
Glide install asks for git username and password multiple times
Hi, When I do a glide install on UBUNTU it asks for username thrice, like this.
Username for 'https://github.com': Username for 'https://github.com': Username for 'https://github.com':
When i enter my username(say "demoUser") it shows,
Password for 'https://[email protected]':
When i enter password (say "demoUser@123") for "demoUser" it shows
Password for 'https://DemoUser@[email protected]':
this actually displays my password on the terminal and this goes on, and if i keep pressing enter it displays
[WARN] Download failed.
After this my Terminal becomes useless, whatever text i type its not visible on the terminal.
I have even tried caching my git password, git commands entered directly on terminal work, but from glide does not work.
Thanks
Need more context, please. Is the project you're working on public? Can you provide the glide.yaml and glide.lock for this project where you're experiencing the problem? Do you know the repository it's reaching out to github for that's triggering this prompt, and if so, is that repository private?
This happens when you provide wrong repository name. Check it twice!
The repositories are private, I removed the entry for one particular repository from glide.lock and did glide install, it worked and then I added the entry once again, and ran the glide install command once again, this seems to have fix the issue for now. Will try it on other systems and provide more details. (My team works on windows machine as well, and this file was created on a windows system, could this have anything to do with end of line character?)
On further investigation I found that this issue occurs for packages that have a list of subpackages.
I had this problem too, but for me works after I set this command on terminal (to use git@git.. protocol) : git config --global url."[email protected]:".insteadOf "https://github.com/"
Same here. So my case is, we have a private repo in the glide.yaml file. I think glide is trying to use the https url instead of the ssh one, thats why it does not use my ssh credentials, thus asks for username and password. Is that what it happens here? If so, is there a config to use ssh instead of https for fetches? If there is no config, would that be something we want to add? I am down to try to submit a PR with this new feature. Let me know.
For me, recently i tried caching my git credentials again and the issue got fixed, since it no longer has to prompt for username and password. Run these commands and then do a git pull, enter username and password, which would be cached, then run the glide commands
git config --global credential.helper cache git config --global credential.helper "cache --timeout=3600"
I had this problem too, but for me works after I set this command on terminal (to use git@git.. protocol) : git config --global url."[email protected]:".insteadOf "https://github.com/"
Works for me! Thank you @priscila225 !
Awesome @priscila225 ! Thanks, this works for me as well
Thanks a lot @priscila225 ! I was stuck there for quite a while...
Check repository permissions with project visibility is public