git-proxy - Git : 代理設置
阿神
阿神 2017-04-24 09:14:08
0
6
948

大伙好,我在Git里面已经配置:
git config --global http.proxy http://proxyuser:proxypwd@proxy.server.com:8080

eg:
git config --global http.proxy http://aa:111@172.1.2.5:8080

但是當我克隆的時候,還是報錯:
git clone https://github.com/plusjade/jekyll-bootstrap.git aaa

请问我还需要设置什么吗?
新手,研究了会,这块没弄好,谢谢。

阿神
阿神

闭关修行中......

reply all(6)
洪涛

I am also suffering from the company's proxy for surfing the Internet. I have to go through the proxy for many requests, shit.
It is recommended that you use a global proxy. Saves you the trouble of setting up a proxy

Recommend Proxifier under window and Proxy Chains under linux

大家讲道理

Written a smart_switcher, which can automatically identify and set various proxies, especially suitable for various switching situations where the office has a proxy and there is no proxy at home.
The principle is based on "How to set up a proxy for Git?" 》, but it’s simplified to super simple, just set your gateway IP and Port.
ReadMe here. . .

smart_switcher

A auto-detect proxy switcher fot http, https, ftp, rsync, ssh, git protocols.


Overview

A smart proxy switcher wrapper, supports http, https, ftp, rsync, ssh(connect depanded), git(connect depanded) protocols. It can automatically detect your network environment and set proxy for you.

If you usually switch the network environment (maybe home with no-proxy and workplace with proxy), it may help you a lot.

Tested in zsh and bash.

Screenshot

Install

Simply source it in your .zshrc, or any shell script resource file like this:

source /path/to/smart_switcher.sh

and, make sure set your proxy_server/gateway in smart_switcher.sh.

Usage

Normally, it executes antomatically when you log in.

smart_switcher supports cecho, who will bring some colors for you.

connect is required if proxy is supported in ssh and git. You can install it easily in path /usr/bin/connect.

巴扎黑

Refer to these two articles
http://infong.net/config-proxy-for-git/
http://ricksu.blog.163.com/blog/static/18906433820125294929508/

PHPzhong

407 means Proxy authentication required, that is, the proxy requires authentication. Are you sure the proxy username and password are correct?

阿神

Set global proxy

 git config --global https.proxy https://user:password@address:port

It seems there is something wrong with yours, try this one.

小葫芦

There is no problem with setting it up like this. It is caused by some settings of my company. Thank you everyone.

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!