Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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

share|improve this question
    
What is a "git bash"? –  womble Jul 29 '11 at 12:42
add comment

2 Answers

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

or in Linus words

share|improve this answer
    
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 5:48
    
Yes, the ssh server or http/https need to be configured to use git –  Aragorn Jul 29 '11 at 5: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 6: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 1 '11 at 10:24
add comment

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).

share|improve this answer
    
I agree with pferate and I used his method –  Thanyaw Zinmin Jul 29 '11 at 6:23
    
Then I got another error failed to connect to repo with port 443. –  Thanyaw Zinmin Jul 29 '11 at 6:23
    
I changed config file with a line of text prot 443!What can I do more? –  Thanyaw Zinmin Jul 29 '11 at 6:24
    
What config file did you change? –  pferate Jul 29 '11 at 6:48
    
I change repo/.git/config –  Thanyaw Zinmin Jul 29 '11 at 6:52
show 2 more comments

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.