.ssh/environment

ssh is approximately equal to friction in physics: always there, ready to trip up the unwary

Problem

bash: line 1: git-upload-pack: command not found

Context

I’d made a new folder on Edison for June development. Instead of being confident, I wanted a new Git repository in June (I’m 99% brand new to Git).  Okay, that seemed to work well enough.  Next, I want to make a copy on a different computer called Blacksmith.  Git-push doesn’t seem to be the correct tool for starting a new repository at the remote end so I figure I need to do this from the remote side.  

git clone ssh://matt@edison.local/Users/matt/Development/806/danny dannyclone

And that’s where the fun begins.

Google says

Although it’s embarrassing to admit, at first I thought the trouble was at Blacksmith since that’s where I was doing the typing.  But it only took a minute of checking $PATH to make me re-jump that conclusion. A few minutes more of fiddling around makes me think the $PATH on Edison is okay too. Hmmm, back to Google where I learn that an SSH session doesn’t read .bashrc.  This may not be literally true but it gets me thinking in the right direction, which soon leads to .ssh/environment.  After a couple of stabs at entering the PATH in that file I find success!  It’s still unclear to me whether chmod 600 on environment is required or just a good idea since I made two changes on the last and successful attempt.

Note: using .ssh/environment is a Bad Thing, especially when a security klutz like me is setting it up.

tags

 

Silver-button-twitter-bird