Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Git on Yosemite keeps asking for remote username and password

I've updated to OS X Yosemite. When running any git command that has to do with the remote repo (pull, fetch, etc) the terminal keeps asking for my github username and password (the remote is on github). If I perform these actions from the github client for mac, it doesn't ask for credentials.

My git config file is fine. My SSH key is fine too. I tried to reinstall the git command line tools from the Github app with no success.

Any suggestions?

like image 232
Nikos M. Avatar asked Oct 17 '14 12:10

Nikos M.


People also ask

Why is Git asking for username and password every time?

If Git prompts you for a username and password every time you try to interact with GitHub, you're probably using the HTTPS clone URL for your repository. Using an HTTPS remote URL has some advantages compared with using SSH. It's easier to set up than SSH, and usually works through strict firewalls and proxies.

How do I get Git to stop asking for my username?

Entering Git Username and Password in Remote URL To prevent Git from asking for your username and password, you can enter the login credentials in the URL as shown. The main drawback of this method that your username and password will be saved in the command in the Shell history file.

How do I permanently set my username and password in Git?

To save username and password in Git, open your “GitHub” remote repository and copy its “URL”. Then, launch “Git Bash”, paste the “URL” with the “$ git clone” command, specify the credential and execute it. Lastly, run the “$ git config –global credential. helper store” command to save the credential in the “.

How do I manage Git credentials on Mac?

Updating your credentials via Keychain AccessType Keychain access then press the Enter key to launch the app. In Keychain Access, search for github.com. Find the "internet password" entry for github.com . Edit or delete the entry accordingly.


1 Answers

Run following on command line.

git config --global credential.helper osxkeychain

Then run your git command. Here is the link that helped me figure out. https://help.github.com/articles/caching-your-github-password-in-git/

like image 113
Amir Sagri Avatar answered Sep 30 '22 06:09

Amir Sagri