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?
Asked
Active
Viewed 1,861 times
3 Answers
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.
-
+1 but perhaps it's worth explicitly saying that this only applies for HTTP / HTTPS URLs – Mark Longair Oct 26 '11 at 08:54
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