created on | August 29, 2025 |
With your ssh public key registered with Gitea, you can push and pull to and from Gitea without being asked for your password for every action.
When signed in into Gitea,
In a terminal, print out the ssh public key:
Copy the content of the key – that is, the whole line, here including the ecdsa-sha2-nistp256. Paste the key into the text area, like shown below and hit Add Key.
Adding ssh public key
click on image to enlarge
You can review the key on the same page:
Reviewing ssh public keys
click on image to enlarge
Go to Site Administration. In the Maintenance Operations panel, go down to the line
“Update the ‘.ssh/authorized_keys’ file with Gitea SSH keys.” and click Run.
Updating gitea with added ssh keys
click on image to enlarge
Now, if you clone a repo from gitea, make sure to clone it not with the HTTPS path, but with the SSH path:
Cloning repo from gitea with SSH scheme
click on image to enlarge
If the origin of a git repo ist set to another scheme than the SSH scheme, you can fix that by editing and set the url in the section :
or run in a terminal.