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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxx/"]
       insteadOf = https://github.com/
   [push]
      default = current

The above pushes and pulls using SSH. Pulls only need HTTPS so I tried
adding the following which does not work as expected:

    [pull "https://github.com/";]

I've found several ways to break Git when trying to setup the HTTPS pull.

My question is, how do I setup the HTTPS pull in my ~/.gitconfig?

Thanks in advance.



[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux