1

When I pull or push to private repo I collaborate, I have to write login and password. For other repos ie. my private repos I can log in with private key. How to avoid providing login informations all the time?

Sławosz
  • 11,187
  • 15
  • 73
  • 106

3 Answers3

1

You can also create a _netrc file in your HOME (note: _netrc for windows, .netrc for bash session on Unix), for a http or read+write https address (as described in "Not able to push the edited file in github", or in this gist)

machine github.com
login <login_github>
password <password_github>

You have other settings here "Syncing with github", like the GitHub credentials.

Community
  • 1
  • 1
VonC
  • 1,262,500
  • 529
  • 4,410
  • 5,250
1

The problem here is how you access the remote repo. With git remote -v you can see all the remote repos. The ones that start with 'git@' are accessed with ssh and therefore use your certificate authentication, but the ones starting with 'http' or 'https' are accesed by HTTP and need external authentications.

The best solution here would be to add all the repos as ssh ones.

Hope this helps.

fuzzyalej
  • 5,903
  • 2
  • 31
  • 49
0

See step 4 here

On the GitHub site Click “Account Settings” > Click “SSH Public Keys” > Click “Add another public key”

IanNorton
  • 7,145
  • 2
  • 25
  • 28