Why does git ask for password




















Trying to be all the human I can be in the time I have. A fun git challenge! I had to make a request against a remote repository in git. The only issue is that only a shared GitHub account had access, not my own account due to a vendor limitation.

So when I occasionally needed to use this remote, I would have to log out and log in as the service account. It just seemed a bit messy.

Thanks for the Sierra update, I just updated and couldn't figure out why github kept asking for pw when I added the git config --global credential. Show 11 more comments. Note the password is the password for your SSH key and not your Mac user password.

Doing ssh-add does work but appears to be reset by closing the Terminal window. Maybe this is a new "feature". Heads up - this happened again with another Sierra update Does anyone know how to have this not be reset after Terminal is closed? I had just updated my macbook pro to Using ssh-add totally worked for me.

Thanks amcc! Show 4 more comments. Use this: Replace github. Darrell Duane Darrell Duane 3, 1 1 gold badge 17 17 silver badges 9 9 bronze badges. I already have that set when viewing git remote -v.

Yet, I am still being prompted for password. Same, I have set as what he suggested, but I still get prompt for password, how do I prevent that? IgorGanapolsky : Did you ever found a solution for you? This works properly. Thus I found this doc. Add a comment. I'm running a Linux server and this was helpful: Caching your GitHub password in Git For Mac: git credential-osxkeychain Windows: git config --global credential. Chase Roberts Chase Roberts 8, 12 12 gold badges 66 66 silver badges bronze badges.

I had to scroll down to the third answer to see the Linux instructions, these should be in the primary answer since it is a commonly referenced issue. Also look for who is asking you for the passphrase. Is it Git or your SSH agent? Pretty sure you are missing a line in the code above - as per stackoverflow. If you want Git to resume to asking you for credentials every time it needs to connect to the remote repository, you can run this command: git config --unset credential.

Lokesh S Lokesh S 3 3 silver badges 13 13 bronze badges. Restart Windows Explorer for environment variables to take effect cannot only restart command prompt Run puttygen. Make your private key startup with Windows via pageant. Francois Francois 1, 2 2 gold badges 13 13 silver badges 8 8 bronze badges. Nobody should be using putty anymore.

You can do everything now with built in Windows 10 utilities. Let putty, just be putty. Use the following command to increase the timeout period so that you could retype password for a while git config --global credential. Ravi Kumar Ravi Kumar 6 6 silver badges 8 8 bronze badges.

Ok, I've found that this does not persist after a restart, so you still need to enter the password after a restart, regardless of timeout This is a nice way to make in cache : At least saved my time. Thanks — ChikuMiku. BenWinding because it stores credentials in memory. Rohan Rohan 6 6 silver badges 17 17 bronze badges. This did not work for me. Ducktales Ducktales 3 3 silver badges 11 11 bronze badges. For Windows credential. It should be git config --global credential.

Storing it worked and now it allows me to commit my changes without prompting for a password all the time, you're a lifesaver!

In Linux this did the job for me git config --local credential. Marko I would advise against this though. You may want to back up the file before editing it.

If you only have a few entries in the file, then wiping it out might not be a bad idea. Show 1 more comment. James Gentes James Gentes 6, 4 4 gold badges 36 36 silver badges 55 55 bronze badges. Been a whlie, but this is what fixed my issue. Learning about GitHub. Signing up for GitHub. Using GitHub. Explore projects. Getting started with Git. Using Git. Just like the previous method, this way of passing user credentials to Git is also unsecure since the storage file is unencrypted and it is protected only by standard filesystem permissions.

Last but not least, you can also use the Git credentials helper to temporarily save your credentials in memory for some time. To do that, issue the following command.

After running the above command, when you try to access a remote private repository for the first time, Git will ask for your username and password and save it in memory for some time. The default caching time is seconds or 15 minutes , after which Git will prompt you to enter your username and password again. Was this guide helpful? Let us know via the feedback form below. You can as well share any questions or thoughts about this topic.

TecMint is the fastest growing and most trusted community site for any kind of Linux Articles, Guides and Books on the web.



0コメント

  • 1000 / 1000