Cannot get Http on git to work

后端 未结 1 1827
鱼传尺愫
鱼传尺愫 2020-11-30 13:22

I am using gitbash for git on my thumbdrive. I have a firewall blocking me and would like to set up my git for http access. I use github and I have seen all kinds of infom

1条回答
  •  时光取名叫无心
    2020-11-30 13:51

    If your firewall allows https, you can use the https-based address of your GitHub repo to push/pull.

    You need:

    • to define in your gitbash session http_proxy and https_proxy environment variable (to the right proxy, with your internet login and password):
      export https_proxy=http://:@aproxy:aport
    • to define where your git will look for the CAs:
      git config --system http.sslcainfo /bin/curl-ca-bundle.crt
    • to make sure you have a HOME environment variable defined (to any directory you want)
    • to have in %HOME% a _netrc file (note the '_') with in it:
    machine github.com
    login YourGitHubLogin
    password YourGitHubPassword
    

    From there, all your git pull/git push from and to GitHub repo will work!

    0 讨论(0)
提交回复
热议问题