Fix Username/Password prompting for github repos cloned via https scheme
source link: https://gist.github.com/ahoward/2885020
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
Fix Username/Password prompting for github repos cloned via https scheme · GitHub
github recently switched to an https scheme as the default for cloning repos. as a side effect you may suddenly be prompted for a 'Username' and 'Password' when you push where, previously, you were able to do so without typing in credentials. the solution is to cause git to cache https credentials which is easy, since git uses curl under the covers
in your home directory create a file called '.netrc', for example
/Users/ahoward/.netrc
in it put these contents
machine github.com login YOUR_GITHUB_USERNAME password YOUR_GITHUB_PASSWORD
fixed!
Recommend
About Joyk
Aggregate valuable and interesting links.
Joyk means Joy of geeK