我正在使用远程 git 托管服务 (Svnrepository.com)。使用 git 1.7.x 作为客户端时,我能够成功访问 git 存储库,但是一旦我将客户端升级到 git 1.8.x,我就无法再推送:the push hangs .托管服务的支持声称这是因为他们使用的是不支持 1.8 版的旧 git 服务器。
- 如何使用 git 1.8 作为客户端,使用较旧的 git 服务器?
- 有解决办法吗?
- 有人知道确切的不兼容性是什么吗?
- 支持者的说法听起来可信吗? 出于某种原因,我认为 git 具有出色的向后/向前兼容性,并且没有理由担心升级会破坏 git
- 在 1.7->1.8 转换中是否引入了一些已知的不兼容性来导致这种情况?
根据要求,这里是 GIT_TRACE=1
的跟踪。它看起来像是在运行 git-http-push
时挂起:
$ GIT_TRACE=1 git push -v
trace: built-in: git 'push' '-v'
Pushing to https://secure2.svnrepository.com/redacted/redacted/
trace: run_command: 'git-remote-https' 'origin' 'https://secure2.svnrepository.com/redacted/redacted/'
trace: run_command: 'http-push' '--helper-status' '--verbose' 'https://secure2.svnrepository.com/redacted/redacted/' 'refs/heads/master:refs/heads/master'
trace: exec: 'git' 'http-push' '--helper-status' '--verbose' 'https://secure2.svnrepository.com/redacted/redacted/' 'refs/heads/master:refs/heads/master'
trace: exec: 'git-http-push' '--helper-status' '--verbose' 'https://secure2.svnrepository.com/redacted/redacted/' 'refs/heads/master:refs/heads/master'
trace: run_command: 'git-http-push' '--helper-status' '--verbose' 'https://secure2.svnrepository.com/redacted/redacted/' 'refs/heads/master:refs/heads/master'
它在最后一行输出后挂起。 (如果你愿意,你也可以 look at a trace 我设置了 GIT_TRACE=1
和 GIT_CURL_VERBOSE=1
。)
最佳答案
想要运行更新版本的 git 是可以理解的,但是如果您选择的主机不运行当前版本,为什么不切换主机呢?单从名称来看,Svnrepository.com 听起来并不像他们专注于 Git 托管。如果托管服务不是您可以更改的东西,那么在您的路径之外的某个地方安装 git1.7 和正常安装 1.8 怎么样。然后你可以将 1.7 版本链接到类似 oldgit
的东西,当你需要使用 Svnrepostiory.com 时,你的命令就像 oldgit add
, oldgit commit
,旧git推送
。
关于git - git 1.8 客户端和旧版 git 服务器之间的兼容性问题,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/14927591/