glide icon indicating copy to clipboard operation
glide copied to clipboard

Glide install asks for git username and password multiple times

Open Kartikkumar-Shetty opened this issue 9 years ago • 11 comments

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

Kartikkumar-Shetty avatar Nov 11 '16 08:11 Kartikkumar-Shetty

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?

sdboyer avatar Dec 07 '16 19:12 sdboyer

This happens when you provide wrong repository name. Check it twice!

dieselburner avatar Dec 15 '16 12:12 dieselburner

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?)

Kartikkumar-Shetty avatar Dec 23 '16 17:12 Kartikkumar-Shetty

On further investigation I found that this issue occurs for packages that have a list of subpackages.

Kartikkumar-Shetty avatar Jan 20 '17 13:01 Kartikkumar-Shetty

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/"

priscila225 avatar Feb 16 '17 21:02 priscila225

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.

arthurnn avatar Mar 01 '17 19:03 arthurnn

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"

Kartikkumar-Shetty avatar Mar 02 '17 09:03 Kartikkumar-Shetty

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 !

yifan-gu avatar Mar 23 '17 19:03 yifan-gu

Awesome @priscila225 ! Thanks, this works for me as well

mhr78 avatar Mar 23 '17 21:03 mhr78

Thanks a lot @priscila225 ! I was stuck there for quite a while...

AgrimPrasad avatar Mar 30 '17 02:03 AgrimPrasad

Check repository permissions with project visibility is public

guunergooner avatar Oct 20 '18 09:10 guunergooner