Though I get a stable IP by ssh reverse tunnel on Xie’s workstation and can use Git through LAN instead of GitHub, I still feel dissatisfy. So I turned to self-hosted Git service, Gogs.
After wasting a afternoon, I failed, mainly due to non-default port, especially ssh.
There is no space to specify custom port in Git protocol (maybe due to scp), so I switch to ssh protocol. Then I get
ssh://email@example.com:port/user/repo.git, which obviously doesn’t work. I was not only asked to type password for Git 1, but also told
/user/repo.git doesn’t seem like a Git repository even after I did.
Finally, I figured out the url should be
ssh://firstname.lastname@example.org:porthome/git/gogs-repositories/user/repo.git, and managed to push 2. But, Gogs tells me that the repository is empty.
Desperated, I want to go VPS for a demo. But GFW seems to have detected my proxy 3, maybe I should change for another VPS.
Following is the code I used:
sudo useradd git -m -s /bin/bash sudo apt install mysql-server -y mysql -u root -ppasswprd mysql>CREATE DATABASE gogs; mkdir -p custom/conf
custom/conf/app.ini, note password for mysql.