我使用GitLab CE。 我通过导入URL初始化一个新的仓库:
https://username:password@gitlab.company.com/group/project.git
在我的密码中有一个特殊字符@
。然后错误:
Cloning into bare repository '/var/opt/gitlab/git-data/repositories/vydn/myzip.git'...
fatal: unable to access 'https://username:p@ssword@gitlab.company.com/group/project.git': Couldn't resolve host 'ssword@gitlab.company.com/group/project.git'
如何使用密码在此上下文中具有字符@
?
答案 0 :(得分:1)
单独发送username & password
https://github.com/foobar/SparkDataSystem --username <user> --password <pass>
或者,您可以保存username
&amp; password
减少必须输入用户名/密码的时间
$ git config credential.helper store
$ git push http://example.com/repo.git
Username: <type your username>
Password: <type your password>
[several days later]
$ git push http://example.com/repo.git
[your credentials are used automatically]
答案 1 :(得分:1)
根据RFC 3986,
@
是一个特殊字符,需要像这样编码:
https://xxxx:yyyy%40zzzz@mygit.mycompany.com/hello/
^^^
|_ instead of '@'