SSH - ksh: git: not found

I have a GIT running on a Solaris server.

On a Windows machine, I installed cygwin to try to clone the repository hosted on the server.

I do the following:

  $ git clone username@server : project.git
 ksh: git-upload-pack: not found

So I'm trying

  $ ssh username@server echo \ $ PATH
 / usr / bin

It looks like GIT is not located in / usr / bin /, but in / usr / local / bin /. I tried changing PATH in .bashrc in my home directory on the server to add / usr / local / bin / ... but it does not work.

What am I doing wrong?

+4
source share
3 answers

~/.bashrc is read by non-login shells, but only by bash , and your server uses ksh .
~/.profile is (I think) a universal initialization file, but it can only be read using the login shells .
~/.kshrc is a typical boot file read by ksh, but only if the ENV environment variable is set for it (but see SendEnv in the ssh_config man page).


You can also always pass the --upload-pack=/usr/local/bin/git-upload-pack option to "git clone" (and then set the remote.origin.uploadpack configuration variable) if you cannot set the PATH on the remote a computer. And of course, remote.origin.receivepack if it cannot find git -receive-pack.

+9
source

It looks like your shell on the Solaris machine is ksh, not bash, so your .bashrc is not readable. Try making changes to .profile

+4
source

I had to add / usr / local / bin to my path in .profile so that it could be selected on solaris (and get git upload-pack to work). I always thought that these were my boxes, which were poorly configured, but maybe not ...

0
source

All Articles