【发布时间】:2014-07-14 17:22:08
【问题描述】:
可以使用
克隆一个 repogit clone https://username:password@github.com/username/repository.git
但是,当密码包含正斜杠时,这不起作用。错误是:
error: Couldn't resolve host 'klaus777:password' while accessing
https://klaus777:password/.@bitbucket.org/romeo/server-code.git/info/refs
fatal: HTTP request failed
如果我对斜线进行 URL 编码,则会收到以下错误:
error: The requested URL returned error: 401 while accessing
https://klaus777:password%2F%2E@bitbucket.org/romeo/server-code.git/info/refs
fatal: HTTP request failed
因此,问题是:您如何处理密码中的正斜杠?
附言。如果我从 URL 中删除密码并在出现提示时提供密码,一切正常。
【问题讨论】: