git clone/push/pull fails since update #8861

Closed
opened 2025-11-02 08:21:29 -06:00 by GiteaMirror · 2 comments
Owner

Originally created by @Simon-the-Sorcerer on GitHub (Apr 25, 2022).

Description

Since our update to 1.16.5 we no longer have access to our repositories via ssh. For example, when we try to execute a git pull, we get the following message:

Gitea: Unauthorized
fatal: Could not read from remote repository.

Please make sure you have the correct access rights
and the repository exists.

The following messages can be found in the logs of the docker container:

gitea-app    | 2022/04/25 14:56:09 Started GET /api/internal/serv/command/1/ansible/foo?mode=1&verb=git-upload-pack for 127.0.0.1:38774
gitea-app    | 2022/04/25 14:56:09 Completed GET /api/internal/serv/command/1/ansible/foo?mode=1&verb=git-upload-pack 404 Not Found in 4.13364ms

An upgrade to 1.16.6 brought no improvement.

Gitea Version

1.16.5

Can you reproduce the bug on the Gitea demo site?

No

Log Gist

https://gist.github.com/Simon-the-Sorcerer/40b383e0ea1b02292a21e6c335b46b01

Screenshots

No response

Git Version

2.25.1

Operating System

Ubuntu 20.04.4 LTS

How are you running Gitea?

Our instance is a Docker installation with ssh container passthrough set up.

Database

MySQL

Originally created by @Simon-the-Sorcerer on GitHub (Apr 25, 2022). ### Description Since our update to 1.16.5 we no longer have access to our repositories via ssh. For example, when we try to execute a `git pull`, we get the following message: ``` Gitea: Unauthorized fatal: Could not read from remote repository. Please make sure you have the correct access rights and the repository exists. ``` The following messages can be found in the logs of the docker container: ``` gitea-app | 2022/04/25 14:56:09 Started GET /api/internal/serv/command/1/ansible/foo?mode=1&verb=git-upload-pack for 127.0.0.1:38774 gitea-app | 2022/04/25 14:56:09 Completed GET /api/internal/serv/command/1/ansible/foo?mode=1&verb=git-upload-pack 404 Not Found in 4.13364ms ``` An upgrade to 1.16.6 brought no improvement. ### Gitea Version 1.16.5 ### Can you reproduce the bug on the Gitea demo site? No ### Log Gist https://gist.github.com/Simon-the-Sorcerer/40b383e0ea1b02292a21e6c335b46b01 ### Screenshots _No response_ ### Git Version 2.25.1 ### Operating System Ubuntu 20.04.4 LTS ### How are you running Gitea? Our instance is a Docker installation with [ssh container passthrough](https://docs.gitea.io/en-us/install-with-docker/#sshing-shim-with-authorized_keys) set up. ### Database MySQL
GiteaMirror added the type/bug label 2025-11-02 08:21:29 -06:00
Author
Owner

@jockel127 commented on GitHub (Apr 25, 2022):

Same issue. :(

@jockel127 commented on GitHub (Apr 25, 2022): Same issue. :(
Author
Owner

@Simon-the-Sorcerer commented on GitHub (Apr 27, 2022):

I found the solution in the docs

  • Verify that the correct public keys are added to .ssh/authorized_keys.
    • Try to run Rewrite '.ssh/authorized_keys' file (for Gitea SSH keys) on the Gitea admin panel.

This fixed our Issues

@Simon-the-Sorcerer commented on GitHub (Apr 27, 2022): I found the solution in the [docs](https://docs.gitea.io/en-us/faq/#ssh-issues) > * Verify that the correct public keys are added to .ssh/authorized_keys. > * Try to run Rewrite '.ssh/authorized_keys' file (for Gitea SSH keys) on the Gitea admin panel. This fixed our Issues
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/gitea#8861