Skip to content

Instantly share code, notes, and snippets.

View fabioluzm's full-sized avatar

Fabio Moreira fabioluzm

  • PrimeIT
  • Portimão, Portugal
  • 16:28 (UTC +01:00)
View GitHub Profile
@fabioluzm
fabioluzm / caching-https-creds.markdown
Created April 22, 2020 15:23 — forked from ahoward/caching-https-creds.markdown
Fix Username/Password prompting for github repos cloned via https scheme

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