2012-10-19 34 views
2

虽然这是一个常见的问题,这是一个比其他人有特殊的不同,当我发出git ls-remote https://[email protected]/myser/repo.git时,它要求我输入密码并给出结果:Git通过HTTPS可以列表,但不能克隆

tomaz:~/ $ git ls-remote https://[email protected]/tcanabrava/randrepo.git 
Password: 
1c8cd7266ad19de952db096a0f25ee16dc3cdace  HEAD 
1c8cd7266ad19de952db096a0f25ee16dc3cdace  refs/heads/master 

,但是当我发出混帐克隆...

tomaz:~/ $ $git clone https://[email protected]/tcanabrava/randrepo.git 
Cloning into 'felipao'... 
Password: 
error: RPC failed; result=22, HTTP code = 401 
fatal: The remote end hung up unexpectedly 

而且我心中已经已经看过一遍又一遍在所有Google答案此特定错误并没有什么可以修复它。

  1. 我确信地址是正确的,它列出了使用ls-remote的分支。
  2. 已经设置postBuffer = 52428800
  3. 的代理都很好,它列出了使用LS-远程
  4. 运行与分支GIT_CURL_VERBOSE = 1太长,张贴在这里不幸=(
+0

它是一个url格式问题,如http://stackoverflow.com/a/5810821/6309?你使用的是哪个版本的git? – VonC

+0

tomaz:Projetos/$ git git version 1.8.0 –

回答

0

我有类似的问题。我不知道是什么帮助,但是:

  1. 我降级卷曲至7.25
  2. 我换用的.netrc URL格式(http://stackoverflow.com/questions/5796171/git-clone-over- https-401-error-and-not-asking-for-username-or-password/5810821#5810821)
  3. 一切都在git 1.7.10下。我从1.8.0-1降级(在WebDav上拉和克隆只是在这个版本中不起作用,就1.7版而言,如果有人知道为什么,请写评论)。