Another few hours of head-banging – All my own fault though. So I’m setting up gitosis, all went well up to the point of cloning the gitosis admin repository on my local machine – The command failed with a “connection closed by remote host error”. After yesterday and my run in with scp I quickly spotted it was trying to use ssh port 22 – I have moved my port.
Searching was helpful, basically you just add a “~/.ssh/config” file and specify the host and new port. What none of the text said was this should be on your local machine not on the server! Another duh for me. Eventually I twigged. Ssh is fine now, but I’m getting permission errors, should be easier to fix…And they were.
Again, read the documentation! The gitosis install appended a new ssh key – Just removed the old one. This makes the user effectively for git development and I can’t ssh in – Which is fine and makes some sense.
Off to find a git browser – cgit looks good…
Here’s an example ssh config file so that git can use ssh on a non standard port ~/.ssh/config:
host github_tunneled
hostname localhost
port 2222
and .git/config file matches it:
[remote "origin"]
url = git@github_tunneled:rdp/redcar.git
then it’ll use port 2222