I am unsure what happened. I deleted old keys, added a new one and verified it on Codeberg. I have several different Git sources in my ssh config file, as I also use/used self-hosted Forgejo and Gitea.
I can pull repos. I cannot push, either with the ssh://git.codeberg.org url or the https://www.example.com/repo.git. Each time, the push is rejected.
git push -u origin main
git@codeberg.org: Permission denied (publickey).
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.
In my ssh config:
Host codeberg.orgAddKeysToAgent yesUseKeychain yesIdentityFile ~/.ssh/newmac
### Comment
I am unsure what happened. I deleted old keys, added a new one and verified it on Codeberg. I have several different Git sources in my ssh config file, as I also use/used self-hosted Forgejo and Gitea.
I can pull repos. I cannot push, either with the `ssh://git.codeberg.org` url or the `https://www.example.com/repo.git`. Each time, the push is rejected.
```sh
git push -u origin main
git@codeberg.org: Permission denied (publickey).
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.
```
In my ssh config:
```yaml
Host codeberg.org
AddKeysToAgent yes
UseKeychain yes
IdentityFile ~/.ssh/newmac
```