Futurile spent some time investigating and eventually got to the bottom of it.
Useful information is that the Gitea server (git.sdf.org) is hosted on ma.sdf.org. After your Gitea account is created, it will reside on ma.sdf.org at
- Create Gitea account as instructed in Hosted git repos.
- Login to the Gitea webapp and navigate to the repository for which you want SSH key access. (Create a new repository if needed.)
- Upload a public ssh key using the Gitea webapp.
- In then Gitea web app go to Settings (top right) and then SSH/GPG Keys. In the Manage SSH Keys select 'Add Key' and upload a public SSH key.
- Gitea manages the public SSH key *separately* from any other that you use to normally access ma.sdf.org. Some people are using:
- their existing ma.sdf.org public ssh key and they're uploading it to gitea
- a new key pair specifically for this gitea. Either of these is fine.
- Check that public key authentication to Gitea is working.
- The Gitea server is running on the system as the 'git' user, so you need to ssh into it using 'git' as the username (rather than your normal sdf username).
- The Gitea server is running on port 2222, so our test of public key authentication will specify this port manually. (It is possible for the server to switch seamlessly to port 2222 whenever the 'git' username attempts an SSH connection, but this option has not been configured at present.)
- At the command line, test that your newly-uploaded SSH key is recognized by Gitea. A dedicated stanza for git.sdf.org in $HOME/.ssh/config will load the key automatically, or you can use ssh-agent as shown below.
$ keychain ~/.ssh/<the-ssh-key-in-gitea> $ ssh -vvv email@example.com -p 2222
- You'll see a load of output, if it's successful you'll see:
Offering public key: <key> <more output> debug1: Authentication succeeded (publickey). Authenticated to git.sdf.org ([184.108.40.206]:2222).
The server is not configured to allow shell access over this SSH connection, so the test will terminate automatically and return you to your local machine.
- Set up your repository one of two ways:
- Use the repository via git
- The Gitea web page for any empty repository you create will show you the commands for accessing it via ssh. (Once content is uploaded, this information disappears from the landing page of the repository.) Because Gitea is actually running on port 2222, you have to add this to the command line provided.
$ git pull firstname.lastname@example.org:2222/<your-sdf-id>/<repository-name>.git $ git pull email@example.com:2222/futurile/futurile-www.git
- Import an existing repository
- I had an existing repository that I wanted to now upload into gitea. To do that we add a new remote.
$ git remote add <name> <url> $ git remote add upstream ssh://firstname.lastname@example.org:2222/futurile/futurile-www.git $ git push upstream master
- For my own reasons I've called the remote 'master' whereas most instructions call it 'origin' - but it's the same thing.
- Check output in Gitea
- You should see output on the command-line, and when you login to the Gitea web app you can verify that the files were uploaded.