Skip to Content

failed attempt to build Gogs


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://, 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://, 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

mkdir -p custom/conf

custom/conf/app.ini, note password for mysql.

  1. although I have add SSH key for my account↩︎

  2. still need to type password of Git↩︎

  3. The alternative hopenthesis is either Nankai’s or DO’s network is too slow, I would rather believe it’s the former↩︎