Can't git clone code from resin (fatal: unpack-objects failed)


#1

My machine where my project repo (code) is inaccessible right now, and I thought I could access the code from another machine by pulling the git repo from resin, so I did the follow

mkdir myproject
cd myproject
git init
git remote add resin gh_arthurlutz@git.resin.io:gh_arthurlutz/project.git
git remote -v
resin	gh_arthurlutz@git.resin.io:gh_arthurlutz/project.git (fetch)
resin	gh_arthurlutz@git.resin.io:gh_arthurlutz/project.git (push)
$ git pull -v --all
Fetching resin
remote: Counting objects: 89, done.
remote: Compressing objects: 100% (87/87), done.
fatal: The remote end hung up unexpectedly
fatal: early EOF
fatal: unpack-objects failed
error: Could not fetch resin

Any explanation for this ? Any way around ?


#4

I’ve not seen that method before, but how I usually do it is like:

git clone <username>@git.resin.io:<username>/<app>.git 

Basically just run git clone on the remote. I tested this and it’s working for me:

~/temp  git clone gh_camerondiver@git.resin.io:gh_camerondiver/supervisortest.git
Cloning into 'supervisortest'...
remote: Counting objects: 14, done.
remote: Compressing objects: 100% (12/12), done.
remote: Total 14 (delta 2), reused 0 (delta 0)
Receiving objects: 100% (14/14), done.
Resolving deltas: 100% (2/2), done.

#6

I tried that too and I’m getting the same error.

I though it might be an error due to an SSH key not being known by resin, but I have both ssh keys in my resin.io profile (by the way you can import a duplicate key).


#7

I remember having an issue like this when I added a key for resin.io after initially using my github key and changing some names from the local defaults. I fixed it by adding a ~/.ssh/config file containing,

Host git.resin.io
IdentityFile ~/.ssh/name_of_id_rsa_file

That sorted it right out for me. Perhaps it is something similar. Perhaps not, but it did jog something in my memory…


#8

Please keep in mind that resin.io isn’t a git hosting platform; the git endpoints behave more like a cache, and repositories may be evicted from it at times due to various reasons, causing cloning from them to fail.