Gogs (standalone git service) as a Fly example

Want to run Gogs, the standalone git server, on Fly? Check out our new example on https://github.com/fly-examples/appkata-gogs. Leave your thoughts in the comments here - Anything you want to know, anything you need.

3 Likes

@Codepope thank you for publishing this guide. It’s been super useful to us. :raised_hands:

There were a couple of things we got stuck on, so we made some notes to fill-in the gaps: GitHub - dwyl/gogs-server: ⚙️ CI/CD Pipeline + Docs for our Gogs Server on Fly.io

We noted that the repo is archived: GitHub - fly-apps/appkata-gogs: Deploy Gogs using Fly

Otherwise we would gladly submit a Pull Request to update it and fill in the gaps to save other people our pain.

Specifically: when attempting to run git commands on our gogs server deployed to Fly.io, we had to specify the protocol and TCP port in the url.

If you attempt to clone the repo using a standard command, e.g:


git clone git@gogs-server.fly.dev:nelsonic/public-repo.git

You will see the following error:

ssh: connect to host gogs-server.fly.dev port 22: Connection refused
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.

You will need to use the following format:

git clone ssh://git@mydomain.com:[port]/org|usernam/repo-name.git

Read more: version control - Git on custom SSH port - Stack Overflow

e.g:

git clone ssh://git@gogs-server.fly.dev:10022/nelsonic/public-repo.git

That will work for git clone | pull | push etc.

Hope this helps others wanting to run Gogs on Fly.io:crossed_fingers: