Git - Use port 9418 for remote device on github

I am trying to connect to github at school, but port 443 is blocked.

The administrator told me to use port 9418 instead, which I believe is the default port for the git protocol.

But in git bash (windows), if I try to make git the remote source-source of the git://github.com/me/myrepo.git and do push, it tells me that I can not click on this url address and use https://github...

How to configure git to use port 9418?

+4
source share
2 answers

From the github documentation :

You can only click on one of the two URLs to record the protocol. These two include an SSH URL like git @ github.com: user / repo.git or an HTTPS URL like https://github.com/user/repo.git .

So, you need to open port 22 or 443 to work, the git protocol is read-only.

+5
source

check: ReadyState4 or git remote add with another ssh port

One way: git remote add origin ssh:// git@domain.com :<port>/<project name>


Second way: change .git/config

old:

 [remote "origin"] fetch = +refs/heads/*:refs/remotes/origin/* url = git@domain.com :<project name> 

new

 [remote "origin"] fetch = +refs/heads/*:refs/remotes/origin/* url = ssh:// git@domain.com :<port>/<project name> 
+5
source

All Articles