Thread (4 messages) flat view 4 messages, 2 authors, 2018-08-05

Re: How to push using SSH and pull using HTTPS for all repos on GitHub?

From: Jeffrey Walton <hidden>
Date: 2018-08-05 02:19:59

On Sat, Aug 4, 2018 at 9:26 PM, Jonathan Nieder [off-list ref] wrote:
Hi,

Jeffrey Walton wrote:
quoted
I'm having trouble setting up my ~/.gitconfig to push using SSH and
pull using HTTPS for all repos on GitHub. The idea is, no passwords on
pulls and only use the password for push.

I've got the first part of the equation using the following in my
~/.gitconfig (the ellipses are user info):

   $ cat ~/.gitconfig
   ...
   # Enforce SSH
   [url "ssh://git@github.com/"]
       insteadOf = https://github.com/
Does putting pushInsteadOf here work?
Yes, that was the trick.

Thank you very much.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help