【发布时间】:2017-03-07 19:25:28
【问题描述】:
我正在尝试执行 git clone 命令从 github 存储库克隆源代码。我使用的是 2.11.1 版本。我运行的命令是
git clone https://username:password@github.com/repository.git ./localpath
这在 Windows 机器上运行良好。但是当我从 linux 机器命令执行时,正在删除 @ 并抛出错误。执行失败就像
git clone https://username:passwordgithub.com/repository.git ./localpath Cloning into './localpath'...
error: Couldn't resolve host username:passwordgithub.com while accessing
有人可以帮我解决这个问题吗?
【问题讨论】:
-
您是否尝试过使用 \ 转义 @ 字符?
-
你用的是什么外壳?
-
@mipadi 正在使用 bash shell。
-
@user2773289 当我使用 jenkins 时,不要使用 \。它失败了。
-
@user2773289,可能与未转义密码冲突。