相关疑难解决方法(0)

在git代理密码中转义@字符

我有git代理配置为'http.proxy = http:// userId:pwd @ 123 @ipaddress:port'但是在克隆远程项目时,我收到错误

Cloning into git...
error: Couldn't resolve proxy '123@ipaddress' while accessing http://git.kernel.org/pub/scm/git/git.git/info/refs

fatal: HTTP request failed
Run Code Online (Sandbox Code Playgroud)

如何逃避密码中的'@'字符?

请注意:我无法更改密码.

git msysgit

72
推荐指数
5
解决办法
6万
查看次数

如何在 git URL 中转义密码的“@”

借口:
我看到这个:Escape @ character in git proxy password 但它是关于http.proxyparam 的,p%4055对我来说关于urlparam不起作用。

我的问题:
我使用 git 版本 1.7.1
我的密码存储库是:p@55
我使用gitlab服务器和centos客户端。
.git/config文件中,我是这样的:

[remote "origin"]
url = http://user:p@55@domain.com:port/repo.git
Run Code Online (Sandbox Code Playgroud)

但是当我拉它时,给了我这个错误:

error: Couldn't resolve host '55:domain.com' while accessing ...
Run Code Online (Sandbox Code Playgroud)

我知道转义@字符,但是:

我尝试p\@55,给了我这个错误:

fatal: bad config file line 8 in .git/config
Run Code Online (Sandbox Code Playgroud)

我尝试p%4055,给了我这个错误:

error: The requested URL returned error: 401 while accessing ...
Run Code Online (Sandbox Code Playgroud)

git escaping

3
推荐指数
1
解决办法
3000
查看次数

标签 统计

git ×2

escaping ×1

msysgit ×1