码迷,mamicode.com
首页 > 其他好文 > 详细

git,npm,bower设置代理地址

时间:2017-10-24 21:07:23      阅读:599      评论:0      收藏:0      [点我收藏+]

标签:pre   document   profile   方法   gis   http   snippet   bower   指令   

我們先假設代理伺服器的位址為:

  • http://10.0.0.1:8080

設定 Git 使用代理伺服器

輸入兩行指令即可設定完畢:

  • git config --global https.proxy http://10.0.0.1:8080
  • git config --global http.proxy http://10.0.0.1:8080
  • git config --global http.sslVerify false

取消設定 Proxy 的方法:

  • git config --global --unset http.proxy
  • git config --global --unset https.proxy
  • git config --global --unset http.sslVerify

參考資料

設定 npm 使用代理伺服器

輸入兩行指令即可設定完畢:

  • npm config set https-proxy http://10.0.0.1:8080
  • npm config set proxy http://10.0.0.1:8080
  • npm config set strict-ssl false

取消設定 Proxy 的方法:

  • npm config delete https-proxy
  • npm config delete proxy
  • npm config delete strict-ssl

參考資料

 

設定 Bower 使用代理伺服器

請建立一個 %UserProfile%\.bowerrc 檔案 ( 若為 Mac OS X 請建立 ~/.bowerrc 檔案 ),其內容如下:

{
 "registry":"http://10.0.0.1:8080"
"proxy": "http://10.0.0.1:8080",
"https-proxy": "http://10.0.0.1:8080", "strict-ssl": false }

取消設定 Proxy 只要將 %UserProfile%\.bowerrc 檔案刪除即可。

git,npm,bower设置代理地址

标签:pre   document   profile   方法   gis   http   snippet   bower   指令   

原文地址:http://www.cnblogs.com/Nyan-Workflow-FC/p/7725192.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!