Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Unsupported compression, Azure git push over SSH?

I am trying to push a new branch to azure repo which fails. Get an error that the compression method isn't supported. Tried googling for the error but my search didn't display anything that looked as the same problem.

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 '[email protected]:v3/vh/VHT/VHT'

Tried to find a solution to create this branch over the ssh url. Works fine if I change my push URL to https instead of ssh. So, suggestions on where I should look for an answer, or if you have the solution to push up a newly created branch to Azure repo through git cli would be much appreciated.

like image 631
duxck Avatar asked Dec 12 '19 12:12

duxck


2 Answers

I got this error while moving a repository from gitlab to vsts for a client. I managed to solve it without switching from SSH to HTTPS by running

  1. git gc to perform a garbage collection in my clone
  2. git remote prune origin to clean up any stale branch references

And then retrying the git push vsts --all.

vsts refers to my remote name for the new vsts repository. origin points to my gitlab repository.

like image 137
nover Avatar answered Sep 25 '22 02:09

nover


I did find a work around. where you change from ssh to https. This works in my case but doesn't feel correct since I made a point to clone the repo to begin with as SSH (and are probably use cases where you are stuck with SSH only).

PS C:\dev\vh> git remote -v
origin  [email protected]:v3/vh/VHT/VHT (fetch)
origin  [email protected]:v3/vh/VHT/VHT (push)

PS C:\dev\vh> git remote set-url --push origin https://[email protected]/vh/VHT/_git/VHT
PS C:\dev\vh> git remote -v
origin  [email protected]:v3/vh/VHT/VHT (fetch)
origin  https://[email protected]/vh/VHT/_git/VHT (push)

Such as:

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'.
like image 25
duxck Avatar answered Sep 21 '22 02:09

duxck