I have a git repository on my server i can ssh over port 443. But now i want to pull from that server and push to it but git gives me connection refused. I think it's connecting over port 22 but i want it to connect over 443. I use tortoiseplink to connect with how can i make it connect through port 443 when pushing or pulling ?
+2
A:
Define your remote such that it uses port 443, or setup your ssh config so it knows to use port 443 for that host.
git remote add origin ssh://some.host:443/path/to/repo.git
jamessan
2010-05-28 17:56:16
+2
A:
First, git will execute the command in a shell where it will look for the environment variable HOME
(which is not a Windows standard environement variable).
So make sure it does reference a correct path (any path you want)
Then ssh will look for your your public and private key in ~/.ssh/id_rsa(.pub)
.
Make sure you have them there (you can generate them in a Git bash session: ssh-keygen -t rsa
.
Make also sure you have the public key copied in 'authorized_keys
' (which you have, since you can ssh on the server)
Finally, in your HOME/.ssh
directory, create a file named 'config
':
host remoteServer
user yourLogin
hostname remoteServerName
port 443
identityfile ~/.ssh/id_rsa
You should then be able to use git pull or git push
git pull remoteServer:/path/to/repo.git
VonC
2010-05-28 18:35:47