Github for windows設定代理

來源:互聯網
上載者:User

標籤:github   git   shell   git for window   github 代理   

Github for windows設定代理 一:簡介

      

        在公司、常常為了某些原因會使用代理、所以要在有代理的環境下使用Github、就要為其設定代理。Github for windows提供了GUI和shell 版本、GUI沒有提供設定代理的地方、可以通過shell設定。最終結果都是修改Github的設定檔.gitconfig、此檔案一般都在使用者目錄下:C:\Users\andychen\.gitconfig。如以前的文章提到過、設定檔沒有特殊必要的話、最好是放在使用者目錄下、而不是放在一個全部使用者都能使用的絕對路徑下。

 

二:具體操作

 

        1. 直接修改.gitconfig設定檔C:\Users\andychen\.gitconfig:

 

        開啟後添加http段落:

[user]    email = [email protected]    name = ligouden[alias]    co = checkout    br = branch    ci = commit    st = status[http]    proxy = 10.45.40.148:8080

        2. 命令列下面修改、

        開啟gitShell:

   C:\Users\andychen\Documents\GitHub> git config --global http.proxy 10.45.40.148:8080

然後查詢http代理:

   C:\Users\andychen\Documents\GitHub>> git config --get http.proxy10.45.40.148:8080

可見命令最終修改的也是gitconfig檔案。

 

Github for windows設定代理

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.