I have a server with SSH access and I want to place a Git origin repo there. I just created a --bare --shared repo locally and copied it to the server per SCP. Now I wanted to clone this repo per SSH url. I tried
ssh://USERNAME@HOST/folder1/folder2/gifolder.git
ssh://USERNAME:PASSWORD@HOST/folder1/folder2/gifolder.git
ssh://USERNAME@HOST:PORT/folder1/folder2/gifolder.git
ssh://USERNAME@HOST:/folder1/folder2/gifolder.git
and some more combinations of the above. But Git always says
"fatal: The remote end hung up unexpectedly"
although I'm enabled to connect per SSH with USERNAME and PASSWORD to HOST.
Is it possible to work with git in the way I want to, or do I have to setup it completely different?
UPDATE:
I configured Git Extension to use OpenSSH instead of Putty and now OpenSSH asks me to enter the password after "clone". When I'm entering the correct password I'm getting the following error:
bash: git-upload-pack: command not found
(OpenSSH seems to get a connection to the server, because it wants me to re-enter my password when i'm entering something else) So. Now I need to fix that new problem. First of all: I'm not enabled to install git on the server. Is it possible to make "git-upload-pack" and "git-receive-pack" available without installing git?
Thanks again
UPDATE2 - SOLUTION:
The solution was to integrate the remote repository-directory as a local directory per SSH/SFTP. I'm using http://www.expandrive.com/ for that purpose. Thanks
You shouldn't need to enter a password when establishing an ssh connection:
If your public key is published on ~/.ssh/authorized_keys, this should be enough.
You might need a password if your private key is protected by a passphrase (in which case, see "ssh daemon asks for a password", you could need an
ssh-agent
).Otherwise, see "Unable to Git-push master to Github" for more ssh debugging tips, including:
ssh -vvvT ssh://USERNAME@HOST
(make sure HOME is defined, especially if you are on Windows: see "Heroku push masterssh
problem")/var/log/secure
, but it can vary depending on the Os)Openssh is a safer choice (and packaged with mysysgit), but it still requires that you define your %HOME% properly.
Again,
ssh -vvvT
will help here.No, it isn't possible.
git
must be installed, and in the path ofsshd
(thessh
daemon running on the server).The OP andineupert concludes in the comments:
You need the binaries git-upload-pack & git-receive-pack in the path on the remote while an ssh is being executed.
If not configure them for every remote link in your repository like this
where origin is the remote.