0

How I can change my git bash default port 22 to 443.Why I want to change?Our local internet policy not allowed to use that port and I got my error of bad file with fatal error when I am cloning to a project.I heard that I can use putty.But I am not sure that I already tested with putty and I was not ok with it.I use SmoothWall Express 3.0-polar-i386 and I set 22 # ssh and is also not working. Please let me know if others methods can help me.

Thanyawzinmin

2 Answers2

1

The port that you communicate on depends on how the Git server you are connecting to is configured. It will have to allow access over HTTPS.

For configuring the server, you can take a look at the "HTTP/S" section in "Git on the Server" chapter in the Pro Git book for more information.

When you clone the repository locally, you can use the syntax:

$ git clone http://example.com/gitproject.git

or

$ git clone https://example.com/gitproject.git

Edit:

Here is a tutorial on Setting up a git repository which can be pushed into and pulled from over HTTP(S).

pferate
  • 453
  • 2
  • 9
1

if you are using ssh use the .ssh/config file

or in Linus words

Aragorn
  • 300
  • 6
  • 11
  • Wouldn't you need to have the server configured to have ssh listen on port 443? What about if it is already listening on 443 for HTTPS? – pferate Jul 29 '11 at 05:48
  • Yes, the ssh server or http/https need to be configured to use git – Aragorn Jul 29 '11 at 05:59
  • But you would only be able to use one of the services at a time on that port. I think this would only be viable if OP has control over the server ***and*** does not need HTTPS on the standard port. – pferate Jul 29 '11 at 06:13
  • I use smooth wall server and I changed 443#https to 443#ssh.I deleted 22#ssh also.And now I am watching the results. – Thanyaw Zinmin Oct 01 '11 at 10:24