I am trying to connect to github at school but port 443 is blocked.
The admin 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 do git remote set-url origin git://github.com/me/myrepo.git
and do a push, it tells me I can't push to this URL, and to use https://github...
instead.
How can I configure git to use port 9418 ?
From github documentation:
You can only push to one of two writeable protocol URL addresses. Those two include an SSH URL like [email protected]:user/repo.git or HTTPS URL like https://github.com/user/repo.git.
So you need open port 22 or 443 to work, git protocol is read only.
check : ReadyState4 or git remote add with other ssh port
One way : git remote add origin ssh://[email protected]:<port>/<project name>
Second way : change the .git/config
old:
[remote "origin"]
fetch = +refs/heads/*:refs/remotes/origin/*
url = [email protected]:<project name>
new:
[remote "origin"]
fetch = +refs/heads/*:refs/remotes/origin/*
url = ssh://[email protected]:<port>/<project name>
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With