1

I have been trying to set up a simple SSH server on my PC to use with Git. The idea is to have a git repo on my PC and push any work I do from my laptop when outside. Both machines run Windows 8.

I tried a couple of SSH server solutions, but I finally decided to go with Bitvise SSH server. I can SSH normally from my laptop using public key authentication.

When I try to use Git though, I get an error git-upload-pack: command not found. I seached around and ended up on a post from stack overflow which basically said that the PATH might no be properly set for non-logic users.

I actually executed the command matt said, and it turns out that c\git\bin is not part of the PATH, even though I have set it as a system variable. As far as I can see, editing the system enviornmental variables in Windows does not affect this PATH. Any ideas how I need to set this properly?

Bitvise's settings for the virtual user group I use are the following: enter image description here

Thanks!

2 Answers 2

3

Today, I've had the same experience. I was trying to setup a Git server on Windows 7, with the Bitvise SSH server. After having setup the SSH server and installing Git, when I tried to pull from the origin, I received git-upload-pack: command not found and when trying to push to the origin I received git-receive-pack: command not found.

Obviously, this is server side problem. The server cannot execute git-upload-pack and git-receive-pack. What you will need to do:

To use these Git commands, you should add them to your PATH variable. Follow these steps:

  1. Find the path to your Git install directory (On my machine it's C:\Installs\Git)
  2. On your desktop/start menu: right-click My Computer > Properties
  3. Click Advanced System settings
  4. Open the tab Advanced
  5. Click the button Environment variables
  6. Under System variables find Path and click Edit...
  7. Append ;C:\Installs\Git\libexec\git-core in the lower box.
  8. Click OK, OK, OK, and close everything.

Now, git-upload-pack and git-receive-pack is available in the command line. This is how I fixed this exact problem. Hope it works for you.

0

When I try to use Git though, I get an error git-upload-pack: command not found. I seached around and ended up on a post from stack overflow which basically said that the PATH might no be properly set for non-logic users.

This PATH is not the PATH in the system environment. It's the path for user@sshserver.

You can use ls or dir which depend on what terminal you provide for the ssh client to find The PATH for user@sshserver.

And you need to change the permission for the user on that PATH on server side. You can also refer this link.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .