This Forgejo instance as a Forgejo repo! https://git.badmanners.xyz
Find a file
2024-11-30 19:01:18 +00:00
.gitignore Oops 2024-11-04 00:11:08 +00:00
app-ini.pub.env Enable mailer 2024-09-06 19:55:15 +00:00
compose.yaml Remove force-https option 2024-11-30 19:01:18 +00:00
README.md ProxyJump in SSH config 2024-09-06 09:49:58 -03:00

git.badmanners.xyz

Instructions on how to deploy, run, and use this Forgejo instance.

Deployment

See Forgejo's help page "Installation with Docker" for more information.

Creating a copy

Create an app-ini.env file, an app-ini.pub.env file, and a postgres.env file. To the latter, add a secure Postgres password for the POSTGRES_PASSWORD envvar; and for app-ini.env (the private envvars), add the same value to the GITEA__DATABASE__PASSWD envvar.

Then run:

docker compose up -d

Finally, go to http://localhost:3734 and complete the configuration.

Configuration

If you wish to change Forgejo's configuration, edit the configuration at app-ini.pub.env, which contains most of my configs. See the Configuration Cheat Sheet for a list of supported configs, and the environment-to-ini document to see how envvars map to each app.ini key.

To test it out, try changing GITEA____APP_NAME_ to the name of your liking. Then, restart Forgejo to apply your changes:

docker compose restart server

Setup reverse port-forwarding through sish

Please see or ssi.sh for more information. Serveo.net is another option.

In your ~/.ssh/config:

Host my-sish-server.com
  IdentityFile ~/.ssh/private_keyfile
  IdentitiesOnly yes

Then run the following as a foreground command or daemon (in my Docker Compose file, I'm using autosish:

/usr/bin/autossh -M 0 -F /home/username/.ssh/config -R git.badmanners.xyz:80:localhost:3734 -R git.badmanners.xyz:22:localhost:2734 my-sish-server.com

Usage

Git SSH over port forwarding

Using sish.top as an example proxy jump.

If you have multiple repos, it might be worthwhile to configure the host in your .ssh/config instead. Add the following configuration:

Host git.badmanners.xyz
	ProxyJump sish.top
	Port 22

Otherwise, do the following for a single repo:

GIT_SSH_COMMAND="ssh -J sish.top" git clone ssh://git@git.badmanners.xyz/git_user/cloned_repo.git
cd cloned_repo/
git config core.sshCommand "ssh -J sish.top"
git fetch    # Test that it works