fatal: Could not read from remote repository. #281

Closed
opened 2022-01-20 22:22:43 +00:00 by Sindvero · 2 comments

When I tried to clone a private repo using ssh or pushing to a private repo, I get this error sometimes, when it doesn't hit the good replicas (I'm currently running 3 replicas):

Gitea: Internal Server Error
Gitea: Internal Server Error
fatal: Could not read from remote repository.

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

the log on the replicas that doesn't work are:

│ gitea-0:gitea Accepted publickey for git from 172.20.64.79 port 3908 ssh2: RSA SHA256:hiXEM6lFIro4RdLowrZAr6taYDUN6pb0Tt3EqBnPxa0                                                                               │
│ gitea-0:gitea 2022/01/20 22:20:10 Started GET /api/internal/serv/command/1/abenoist/supertest?mode=1&verb=git-upload-pack for [::1]:56666                                                                       │
│ gitea-0:gitea 2022/01/20 22:20:10 Completed GET /api/internal/serv/command/1/abenoist/supertest?mode=1&verb=git-upload-pack 403 Forbidden in 122.771µs                                                          │
│ gitea-0:gitea 2022/01/20 22:20:10 Started POST /api/internal/ssh/log for [::1]:56668                                                                                                                            │
│ gitea-0:gitea 2022/01/20 22:20:10 Completed POST /api/internal/ssh/log 403 Forbidden in 54.823µs                                                                                                                │
│ gitea-0:gitea Received disconnect from 172.20.64.79 port 3908:11: disconnected by user                                                                                                                          │
│ gitea-0:gitea Disconnected from user git 172.20.64.79 port 3908                                                                                                                                                 │
│ gitea-1:gitea 2022/01/20 22:20:12 ...dels/notification.go:739:GetUIDsAndNotificationCounts() [I] [SQL] SELECT user_id, count(*) AS count FROM notification WHERE user_id IN (SELECT user_id FROM notification W │
│ HERE updated_unix >= $1 AND updated_unix < $2) AND status = $3 GROUP BY user_id [1642717200 1642717210 1] - 1.868938ms                                                                                          │
│ gitea-1:gitea 2022/01/20 22:20:13 ...s/issue_stopwatch.go:71:GetUserStopwatches() [I] [SQL] SELECT "id", "issue_id", "user_id", "created_unix" FROM "stopwatch" WHERE (stopwatch.user_id = $1) [2] - 1.347798ms

I'm not sure where this coming from since all replicas share the same volume with RWX access mode and that I can clone and push when LB use gitea-2 instead of gitea-1 or 0 pod.

Does someone have a workaround this?

Thank you

When I tried to clone a private repo using ssh or pushing to a private repo, I get this error sometimes, when it doesn't hit the good replicas (I'm currently running 3 replicas): ``` Gitea: Internal Server Error Gitea: Internal Server Error fatal: Could not read from remote repository. Please make sure you have the correct access rights and the repository exists. ``` the log on the replicas that doesn't work are: ``` │ gitea-0:gitea Accepted publickey for git from 172.20.64.79 port 3908 ssh2: RSA SHA256:hiXEM6lFIro4RdLowrZAr6taYDUN6pb0Tt3EqBnPxa0 │ │ gitea-0:gitea 2022/01/20 22:20:10 Started GET /api/internal/serv/command/1/abenoist/supertest?mode=1&verb=git-upload-pack for [::1]:56666 │ │ gitea-0:gitea 2022/01/20 22:20:10 Completed GET /api/internal/serv/command/1/abenoist/supertest?mode=1&verb=git-upload-pack 403 Forbidden in 122.771µs │ │ gitea-0:gitea 2022/01/20 22:20:10 Started POST /api/internal/ssh/log for [::1]:56668 │ │ gitea-0:gitea 2022/01/20 22:20:10 Completed POST /api/internal/ssh/log 403 Forbidden in 54.823µs │ │ gitea-0:gitea Received disconnect from 172.20.64.79 port 3908:11: disconnected by user │ │ gitea-0:gitea Disconnected from user git 172.20.64.79 port 3908 │ │ gitea-1:gitea 2022/01/20 22:20:12 ...dels/notification.go:739:GetUIDsAndNotificationCounts() [I] [SQL] SELECT user_id, count(*) AS count FROM notification WHERE user_id IN (SELECT user_id FROM notification W │ │ HERE updated_unix >= $1 AND updated_unix < $2) AND status = $3 GROUP BY user_id [1642717200 1642717210 1] - 1.868938ms │ │ gitea-1:gitea 2022/01/20 22:20:13 ...s/issue_stopwatch.go:71:GetUserStopwatches() [I] [SQL] SELECT "id", "issue_id", "user_id", "created_unix" FROM "stopwatch" WHERE (stopwatch.user_id = $1) [2] - 1.347798ms ``` I'm not sure where this coming from since all replicas share the same volume with RWX access mode and that I can clone and push when LB use gitea-2 instead of gitea-1 or 0 pod. Does someone have a workaround this? Thank you
Member

yes, multiple replicas take a lot of configuration. I've prepared a PR for this #205

and will continue working on it next week. Until this is fully released I'd recommend either using my branch for this or waiting :)

yes, multiple replicas take a lot of configuration. I've prepared a PR for this https://gitea.com/gitea/helm-chart/pulls/205 and will continue working on it next week. Until this is fully released I'd recommend either using my branch for this or waiting :)
Author

Yes, I figured out to make it work with all the correct config, ... I'm still getting flooded by warning message from ssh.go (modules/ssh/ssh.go:259:sshConnectionFailed() [W] Failed connection from 172.20.59.6:33081 with error: EOF) but it doesn't cause issue that I'm aware of, so far everuthing I wanted to do worked (clone and push with ssh, mirror,...).

Maybe the flooded will be fixed with the PR :)

Thanks for you answer!

Yes, I figured out to make it work with all the correct config, ... I'm still getting flooded by warning message from ssh.go (modules/ssh/ssh.go:259:sshConnectionFailed() [W] Failed connection from 172.20.59.6:33081 with error: EOF) but it doesn't cause issue that I'm aware of, so far everuthing I wanted to do worked (clone and push with ssh, mirror,...). Maybe the flooded will be fixed with the PR :) Thanks for you answer!
Sign in to join this conversation.
No Milestone
No Assignees
2 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: gitea/helm-chart#281
No description provided.