git记录

来源:互联网 发布:程序员加油站 编辑:程序博客网 时间:2024/05/29 08:51

Git 的代理设置也非常简单,一句话就搞定了:

git config –global http.proxy http://10.10.10.10:8080
如果需要用户名密码的话,则设置:

git config –global http.proxy http://user:password@http://10.10.10.10:8080
其中 user 和 password 分别为你的用户名和密码。

设置完成后,可以通过如下命令来查看设置是否生效:

git config –get –global http.proxy
如果某一天你不喜欢她了,需要删除代理设置,那么可以使用:

git config –system (或 –global 或 –local) –unset http.proxy
来删除设置。

原创粉丝点击