This page contains some common issues you can run into and their solutions.
If you are having issues with reaching your repositories over
ssh while the
Gitea web front-end and
https based git operations work fine, consider
looking at the following items.
Permission denied (publickey). fatal: Could not read from remote repository. Please make sure you have the correct access rights and the repository exists.
This error signifies that the server rejected your log in attempt, check the following things:
@) is spelled correctly.
ssh [email protected]to ensure that everything is set up properly.
.sshdirectory in the home directory of your
.ssh/authorized_keys. Try to run
Rewrite '.ssh/authorized_keys' file (for Gitea SSH keys)on the Gitea admin panel.
If you get a similar error without the public key part (shown below) then authentication succeeded, but some other setting is preventing ssh from reaching the correct repository.
fatal: Could not read from remote repository. Please make sure you have the correct access rights and the repository exists.
In this case, look into the following settings:
gituser has a usable shell set. You can verify this with
getent passwd git | cut -d: -f7,
chshcan be used to modify this.
gitea servcommand in
.ssh/authorized_keysuses the proper configuration file.