Search code examples
gitauthenticationgit-pushgit-pull

How to config git to pull from http and push through ssh in one 'remote'?


Pulling from http to escape authentication(so I don't need to type password if I'm not using ssh.keygen).

Pushing through ssh with authentication.


Solution

  • From the git-config man page:

    remote.<name>.url The URL of a remote repository. See git-fetch(1) or git-push(1).

    remote.<name>.pushurl The push URL of a remote repository. See git-push(1).

    Try setting the former to an http: url and the latter to a git+ssh: (or just git:) url?