不支持的压缩,Azure git是否通过SSH推送?

时间:2019-12-12 12:11:05

标签: git azure azure-devops azure-repos

我正在尝试将一个新分支推入azure回购,但失败了。收到不支持压缩方法的错误。尝试搜寻该错误,但我的搜索未显示任何看起来相同的问题。

PS C:\dev\vh> git push --set-upstream origin upgrade/2019-12-12_Merged-HC_Development_to_hc
Counting objects: 67, done.
Delta compression using up to 4 threads.
Compressing objects: 100% (41/41), done.
remote: The archive entry was compressed using an unsupported compression method.
fatal: The remote end hung up unexpectedly
fatal: sha1 file '<stdout>' write error: Broken pipe
error: remote unpack failed: error The archive entry was compressed using an unsupported compression method.
error: failed to push some refs to 'git@ssh.dev.azure.com:v3/vh/VHT/VHT'

试图找到一种在ssh url上创建此分支的解决方案。如果将推送URL更改为https而不是ssh,则效果很好。因此,对于我应该在哪里寻找答案的建议,或者您是否具有通过git cli将新创建的分支推送到Azure存储库的解决方案,将不胜感激。

2 个答案:

答案 0 :(得分:3)

在将存储库从gitlab移至客户端的vsts时出现此错误。 我设法解决了 而没有通过运行

SSH切换到HTTPS
  1. git gc在我的克隆中执行垃圾收集
  2. git remote prune origin清除所有过时的分支引用

然后重试git push vsts --all

vsts是指我的新vsts存储库的远程名称。 origin指向我的gitlab存储库。

答案 1 :(得分:0)

我确实找到了解决方法。从ssh更改为https的位置。在我看来,这是可行的,但由于我提出要克隆存储库以使用SSH开头的观点,因此感觉并不正确(可能是在某些情况下,您只能使用SSH)。

PS C:\dev\vh> git remote -v
origin  git@ssh.dev.azure.com:v3/vh/VHT/VHT (fetch)
origin  git@ssh.dev.azure.com:v3/vh/VHT/VHT (push)

PS C:\dev\vh> git remote set-url --push origin https://vh@dev.azure.com/vh/VHT/_git/VHT
PS C:\dev\vh> git remote -v
origin  git@ssh.dev.azure.com:v3/vh/VHT/VHT (fetch)
origin  https://vh@dev.azure.com/vh/VHT/_git/VHT (push)

例如:

PS C:\dev\vh> git push --set-upstream origin upgrade/2019-12-12_Merged-HC_Development_to_hc
Counting objects: 67, done.
Delta compression using up to 4 threads.
Compressing objects: 100% (41/41), done.
Writing objects: 100% (67/67), 1.76 GiB | 2.70 MiB/s, done.
Total 67 (delta 41), reused 28 (delta 23)
remote: Analyzing objects... (67/67) (667290 ms)
remote: Storing packfile... done (24816 ms)
remote: Storing index... done (67 ms)
remote: We noticed you're using an older version of Git. For the best experience, upgrade to a newer version.
To https://dev.azure.com/vh/VHT/_git/VHT
 * [new branch]        upgrade/2019-12-12_Merged-HC_Development_to_hc -> upgrade/2019-12-12_Merged-HC_Development_to_hc
Branch 'upgrade/2019-12-12_Merged-HC_Development_to_hc' set up to track remote branch 'upgrade/2019-12-12_Merged-HC_Development_to_hc' from 'origin'.