1

我正在尝试从https://github.com/RestKit/RestKit.git克隆 RestKit 。
这是我到目前为止所做的:

  1. 安装了 git。

  2. .gitconfig使用正确的参数设置文件~/

    [user]  
        name = myName   
        email = myEmail  
    [http]  
        proxy = http://<username for proxy>:<password for proxy>@PROXY:8080  
        sslverify = false  
    [https]  
        proxy = https://<username for proxy>:<password for proxy>@PROXY:8080  
    
  3. 启动克隆命令如下:

    git clone https://github.com/RestKit/RestKit.git  
    

我收到以下错误:

Cloning into 'RestKit'...  
error: Could not resolve host: (nil); nodename nor servname provided, or not known while accessing https://github.com/RestKit/RestKit.git/info/refs?service=git-upload-pack  
fatal: HTTP request failed  

我错过了什么?

更新:
当我将 .gitconfig 文件中的 http.proxy 替换为
http://:8080

即,没有凭据,然后我收到以下错误:

Cloning into 'RestKit'...  
error: The requested URL returned error: 407 while accessing https://github.com/RestKit/RestKit.git/info/refs?service=git-upload-pack  
fatal: HTTP request failed  
4

2 回答 2

1

好吧,我想通了这个问题。我的密码有一个“@”,因此密码中“@”之后的任何内容都被视为代理地址。相当简单和愚蠢,但我花了很长时间才弄清楚这一点。:(

于 2013-09-19T05:53:12.377 回答
0

有时,如果没有先指定域,代理就无法工作。尝试将此添加到您的.gitconfig

[http]
    proxy = http://mydomain\\myusername:mypassword@PROXY:8080

还可以进一步看看这个问题,它可能会指出一些事情。

于 2013-09-17T14:03:36.333 回答