git clone over ssh error 'fatal: The remote end hung up unexpectedly'
Solution 1
Can you verify that that A) you indeed can ssh into the server, and B) that the repository is exactly at the path specified?
You can do ssh username@host ls /home/shared/g_quoll/repos/ and see if there is a itko-ext.git directory there.
Solution 2
Try:
git clone username@host:/home/shared/g_quoll/repos/itko-ext
Related videos on Youtube
Comments
-
Eugene Yu over 1 year
I'm pretty new to using git and have been struggling to get it work for the last 2 days and now I feel so stupid that I still haven't got it working yet.
I've seen many posts talking about the similar error but none of the answers solved my problem.
my situation here is
project git called
itko-ext.git
is stored in a server and I have an access via sshSo I create a repositary directory on my local storage and used
git init
To copy the
itko-ext.git
into my repositary, I usedgit clone ssh://username@host/home/shared/g_quoll/repos/itko-ext.git
- and this gives me an error
fatal: The remote end hung up unexpectedly
. - I have access to the resource.
- and this gives me an error
I will appreciate any solution.
Regards
-
OwenDoes your server use the default port 22 for ssh?
-
Eugene Yu over 11 yearsunfortunately it says the path does not exist
-
Michael over 11 yearsErr, sorry. I assumed you had provided the correct directory on the remote server. Is the folder on the remote server
/home/shared/g_quoll/repos/itko-ext
? -
Eugene Yu over 11 yearsYes I can ssh into the server, and the path is correct... :( I talked to another colleague and he said it could be because of the size of the folder cuz it's almost 1gb..
-
Eugene Yu over 11 yearsyes, that's the path to the git folder. umm but I'm starting to think that I misunderstood the concept of cloning. Is cloning should be done on the server side? or client side? cuz I've been only trying on client side...
-
pcm over 11 yearsCan you scp the directory to your client using the specified username? IOW
scp -r username@host:/home/shared/g_quoll/repos/itko-ext.git
. Or more generally, try transferring any file from the server using the username. I'm wondering if your ssh keys are set up correctly. -
pcm over 11 yearsSorry, to make the example clearer:
scp -r username@host:/home/shared/g_quoll/repos/itko-ext.git/ /tmp
-
Mark Leighton Fisher over 11 yearsCloning is done where you want the clone (the client side in a client-server model, which Git is not).
-
Eugene Yu over 11 yearsUnfortunately scp didn't work. but what I did was clone the git into a new folder on where the original git is stored then copy the folder into my local computer. I appreciate all of you people. Thanks
-
pcm over 11 yearsIf scp didn't work, but you can ssh into the server, then it sounds like either the path is wrong, or there is some permissions issue on the target folder. If you cannot ssh to the server, then you need to work on that aspect. You can use -vvv to get lots of output on what is going on. If you ended up just copying the directory, then you'll have the repository, but still won't be set up to take advantage of the get push/pull capabilites to keep your copy in sync with the remote end.
-
Eugene Yu over 11 yearsSorry for coming back late. Anwy the problem was that I had a week VPN connection in to the network where server is located. It went all good when I tried in in the network directly.