Git - Use port 9418 for remote on github

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>