Push with ssh don't show files #6992

Closed
opened 2025-11-02 07:13:02 -06:00 by GiteaMirror · 7 comments
Owner

Originally created by @rurickdev on GitHub (Mar 11, 2021).

  • Gitea version (or commit ref): v1.13.4
  • Git version: 2.20.1
  • Operating system: debian running in docker
  • Database (use [x]):
    • PostgreSQL
    • MySQL
    • MSSQL
    • SQLite
  • Can you reproduce the bug at https://try.gitea.io:
    • Yes (provide example URL)
    • No
  • Log gist: WebUI stops and no error is show using docker logs

Description

When pushing to a new empty repository using ssh git show the push had succeded but the ui stop working and nginx shows a 502 error, after the container restarts itself the ui still shows empty repository but trying git push again shows "everything us update"

if trying using http everything works great

after pushing through ssh if I clone the repo using ssh in another dir, the clone command downloads all files without problem

...

Screenshots

Screen Shot 2021-03-11 at 10 03 10

Screen Shot 2021-03-11 at 10 03 41

i use some alias for git, but the steps are this
In dir 1

  • added ssh remote
  • list the remotes
  • simple push to show the is no upstream branch
  • alias command gpsup for git push --set-upstream origin $(git_current_branch)
    • show push info

now web fails with 502 nginx error then reloads and repo still shows empty (above picture)

  • .. is an alias for cd ..
  • git clone from ssh to dir named mock_test_2
    • show clone result
  • change directory to dir 2
  • ls to show files inside cloned repo

i have looked to #14313 but dont have the exact same problem

Originally created by @rurickdev on GitHub (Mar 11, 2021). - Gitea version (or commit ref): v1.13.4 - Git version: 2.20.1 - Operating system: debian running in docker - Database (use `[x]`): - [x] PostgreSQL - [ ] MySQL - [ ] MSSQL - [ ] SQLite - Can you reproduce the bug at https://try.gitea.io: - [ ] Yes (provide example URL) - [x] No - Log gist: WebUI stops and no error is show using `docker logs` ## Description When pushing to a new empty repository using ssh git show the push had succeded but the ui stop working and nginx shows a 502 error, after the container restarts itself the ui still shows empty repository but trying `git push` again shows "everything us update" if trying using http everything works great after pushing through ssh if I clone the repo using ssh in another dir, the clone command downloads all files without problem ... ## Screenshots ![Screen Shot 2021-03-11 at 10 03 10](https://user-images.githubusercontent.com/6403537/110816628-1f0f7280-8251-11eb-8377-22a74561ffde.png) <img width="707" alt="Screen Shot 2021-03-11 at 10 03 41" src="https://user-images.githubusercontent.com/6403537/110816638-20d93600-8251-11eb-9484-876ba4f00aa8.png"> i use some alias for git, but the steps are this In dir 1 - added ssh remote - list the remotes - simple push to show the is no upstream branch - alias command `gpsup` for `git push --set-upstream origin $(git_current_branch)` - show push info > now web fails with 502 nginx error then reloads and repo still shows empty (above picture) - `..` is an alias for `cd ..` - git clone from ssh to dir named `mock_test_2` - show clone result - change directory to dir 2 - `ls` to show files inside cloned repo i have looked to #14313 but dont have the exact same problem
GiteaMirror added the issue/needs-feedback label 2025-11-02 07:13:02 -06:00
Author
Owner

@jolheiser commented on GitHub (Mar 11, 2021):

Have you followed the steps in our FAQ for SSH Issues?
Particularly the first part about making sure Gitea is managing the SSH keys correctly.

@jolheiser commented on GitHub (Mar 11, 2021): Have you followed the steps in our FAQ for [SSH Issues](https://docs.gitea.io/en-us/faq/#ssh-issues)? Particularly the first part about making sure Gitea is managing the SSH keys correctly.
Author
Owner

@zeripath commented on GitHub (Mar 11, 2021):

So in this case it looks like the hooks are working correctly but you've hit the issue of the stuck IsEmpty flag because your first push didn't register properly for whatever reason. If you can make a change and push again - the UI should update.

@zeripath commented on GitHub (Mar 11, 2021): So in this case it looks like the hooks are working correctly but you've hit the issue of the stuck IsEmpty flag because your first push didn't register properly for whatever reason. If you can make a change and push again - the UI should update.
Author
Owner

@rurickdev commented on GitHub (Mar 12, 2021):

@jolheiser I didn't know that exist but i have everything as it says

Screen Shot 2021-03-11 at 11 27 03

@zeripath Tried your suggestion but happen the same, nginx error 502, the container restarted itself, git says its updated but the WebUi doesn't show files

Screen Shot 2021-03-11 at 11 29 33

Screen Shot 2021-03-11 at 11 29 54
@rurickdev commented on GitHub (Mar 12, 2021): @jolheiser I didn't know that exist but i have everything as it says <img width="892" alt="Screen Shot 2021-03-11 at 11 27 03" src="https://user-images.githubusercontent.com/6403537/110869244-a8de3080-828f-11eb-9b02-64ab48431316.png"> --- @zeripath Tried your suggestion but happen the same, nginx error 502, the container restarted itself, git says its updated but the WebUi doesn't show files ![Screen Shot 2021-03-11 at 11 29 33](https://user-images.githubusercontent.com/6403537/110872568-aed71000-8295-11eb-8be1-e6ec8be6250e.png) <img width="506" alt="Screen Shot 2021-03-11 at 11 29 54" src="https://user-images.githubusercontent.com/6403537/110872575-b1396a00-8295-11eb-8aaf-f75958534c60.png">
Author
Owner

@zeripath commented on GitHub (Mar 12, 2021):

Well this is the issue - Gitea is dying when you push - so we need to see some logs from the Gitea server.

@zeripath commented on GitHub (Mar 12, 2021): Well this is the issue - Gitea is dying when you push - so we need to see some logs from the Gitea server.
Author
Owner

@rurickdev commented on GitHub (Mar 12, 2021):

this is what docker logs shows when pushing with ssh

gitea      | Could not load host certificate "/data/ssh/ssh_host_ed25519_cert": No such file or directory
gitea      | Could not load host certificate "/data/ssh/ssh_host_rsa_cert": No such file or directory
gitea      | Could not load host certificate "/data/ssh/ssh_host_ecdsa_cert": No such file or directory
gitea      | Could not load host certificate "/data/ssh/ssh_host_dsa_cert": No such file or directory
gitea      | s6-supervise openssh: warning: can't happen: timeout while the service is up!
gitea      | s6-supervise gitea: warning: can't happen: timeout while the service is up!
gitea      | Accepted publickey for git from 172.31.0.1 port 46390 ssh2: RSA SHA256:0QWzFqlYHNqgNOzILpojtYotfQIbotLfyBdWVXd4hb8
gitea      | s6-supervise openssh: warning: can't happen: timeout while the service is up!
gitea      | s6-supervise gitea: warning: can't happen: timeout while the service is up!
gitea      | 2021/03/12 15:56:13 Started GET /api/internal/serv/command/1/rurickdev/mock_flutter_example?mode=2&verb=git-receive-pack for 127.0.0.1
gitea      | 2021/03/12 15:56:13 Completed GET /api/internal/serv/command/1/rurickdev/mock_flutter_example?mode=2&verb=git-receive-pack 200 OK in 12.907943ms
gitea      | s6-supervise openssh: warning: can't happen: timeout while the service is up!
gitea      | s6-supervise gitea: warning: can't happen: timeout while the service is up!
gitea      | s6-supervise openssh: warning: can't happen: timeout while the service is up!
gitea      | s6-supervise gitea: warning: can't happen: timeout while the service is up!
gitea      | 2021/03/12 15:56:13 Started POST /api/internal/hook/pre-receive/rurickdev/mock_flutter_example for 127.0.0.1
gitea      | 2021/03/12 15:56:13 Completed POST /api/internal/hook/pre-receive/rurickdev/mock_flutter_example 200 OK in 7.029124ms
gitea      | s6-supervise openssh: warning: can't happen: timeout while the service is up!
gitea      | s6-supervise gitea: warning: can't happen: timeout while the service is up!
gitea      | s6-supervise openssh: warning: can't happen: timeout while the service is up!
gitea      | s6-supervise gitea: warning: can't happen: timeout while the service is up!
gitea      | s6-supervise openssh: warning: can't happen: timeout while the service is up!
gitea      | s6-supervise gitea: warning: can't happen: timeout while the service is up!
gitea      | 2021/03/12 15:56:14 Started POST /api/internal/hook/post-receive/rurickdev/mock_flutter_example for 127.0.0.1
gitea      | 2021/03/12 15:56:14 Completed POST /api/internal/hook/post-receive/rurickdev/mock_flutter_example 200 OK in 7.019512ms
gitea      | 2021/03/12 15:56:14 Started POST /api/internal/hook/set-default-branch/rurickdev/mock_flutter_example/master for 127.0.0.1
gitea      | 2021/03/12 15:56:14 Completed POST /api/internal/hook/set-default-branch/rurickdev/mock_flutter_example/master 200 OK in 40.847459ms
gitea      | 2021/03/12 15:56:14 Started POST /api/internal/ssh/1/update/3 for 127.0.0.1
gitea      | 2021/03/12 15:56:14 Completed POST /api/internal/ssh/1/update/3 200 OK in 7.859117ms
gitea      | Received disconnect from 172.31.0.1 port 46390:11: disconnected by user
gitea      | Disconnected from user git 172.31.0.1 port 46390
gitea      | s6-svscan: warning: unable to iopause: Invalid argument
gitea      | s6-svscan: warning: executing into .s6-svscan/crash
gitea      | s6-svscan: fatal: unable to exec .s6-svscan/crash: No such file or directory
``
`
@rurickdev commented on GitHub (Mar 12, 2021): this is what `docker logs` shows when pushing with ssh ``` gitea | Could not load host certificate "/data/ssh/ssh_host_ed25519_cert": No such file or directory gitea | Could not load host certificate "/data/ssh/ssh_host_rsa_cert": No such file or directory gitea | Could not load host certificate "/data/ssh/ssh_host_ecdsa_cert": No such file or directory gitea | Could not load host certificate "/data/ssh/ssh_host_dsa_cert": No such file or directory gitea | s6-supervise openssh: warning: can't happen: timeout while the service is up! gitea | s6-supervise gitea: warning: can't happen: timeout while the service is up! gitea | Accepted publickey for git from 172.31.0.1 port 46390 ssh2: RSA SHA256:0QWzFqlYHNqgNOzILpojtYotfQIbotLfyBdWVXd4hb8 gitea | s6-supervise openssh: warning: can't happen: timeout while the service is up! gitea | s6-supervise gitea: warning: can't happen: timeout while the service is up! gitea | 2021/03/12 15:56:13 Started GET /api/internal/serv/command/1/rurickdev/mock_flutter_example?mode=2&verb=git-receive-pack for 127.0.0.1 gitea | 2021/03/12 15:56:13 Completed GET /api/internal/serv/command/1/rurickdev/mock_flutter_example?mode=2&verb=git-receive-pack 200 OK in 12.907943ms gitea | s6-supervise openssh: warning: can't happen: timeout while the service is up! gitea | s6-supervise gitea: warning: can't happen: timeout while the service is up! gitea | s6-supervise openssh: warning: can't happen: timeout while the service is up! gitea | s6-supervise gitea: warning: can't happen: timeout while the service is up! gitea | 2021/03/12 15:56:13 Started POST /api/internal/hook/pre-receive/rurickdev/mock_flutter_example for 127.0.0.1 gitea | 2021/03/12 15:56:13 Completed POST /api/internal/hook/pre-receive/rurickdev/mock_flutter_example 200 OK in 7.029124ms gitea | s6-supervise openssh: warning: can't happen: timeout while the service is up! gitea | s6-supervise gitea: warning: can't happen: timeout while the service is up! gitea | s6-supervise openssh: warning: can't happen: timeout while the service is up! gitea | s6-supervise gitea: warning: can't happen: timeout while the service is up! gitea | s6-supervise openssh: warning: can't happen: timeout while the service is up! gitea | s6-supervise gitea: warning: can't happen: timeout while the service is up! gitea | 2021/03/12 15:56:14 Started POST /api/internal/hook/post-receive/rurickdev/mock_flutter_example for 127.0.0.1 gitea | 2021/03/12 15:56:14 Completed POST /api/internal/hook/post-receive/rurickdev/mock_flutter_example 200 OK in 7.019512ms gitea | 2021/03/12 15:56:14 Started POST /api/internal/hook/set-default-branch/rurickdev/mock_flutter_example/master for 127.0.0.1 gitea | 2021/03/12 15:56:14 Completed POST /api/internal/hook/set-default-branch/rurickdev/mock_flutter_example/master 200 OK in 40.847459ms gitea | 2021/03/12 15:56:14 Started POST /api/internal/ssh/1/update/3 for 127.0.0.1 gitea | 2021/03/12 15:56:14 Completed POST /api/internal/ssh/1/update/3 200 OK in 7.859117ms gitea | Received disconnect from 172.31.0.1 port 46390:11: disconnected by user gitea | Disconnected from user git 172.31.0.1 port 46390 gitea | s6-svscan: warning: unable to iopause: Invalid argument gitea | s6-svscan: warning: executing into .s6-svscan/crash gitea | s6-svscan: fatal: unable to exec .s6-svscan/crash: No such file or directory `` `
Author
Owner

@zeripath commented on GitHub (Mar 13, 2021):

Those logs are just the router logs. There is very likely a gitea.log file on the docker somewhere but as stated in the issue template please could you read:

https://docs.gitea.io/en-us/logging-configuration/#debugging-problems

That will tell you how to set your logging to just give us something useful.

@zeripath commented on GitHub (Mar 13, 2021): Those logs are just the router logs. There is very likely a gitea.log file on the docker somewhere but as stated in the issue template please could you read: https://docs.gitea.io/en-us/logging-configuration/#debugging-problems That will tell you how to set your logging to just give us something useful.
Author
Owner

@zeripath commented on GitHub (Jun 23, 2021):

Without further information we are unable to help. Please reopen if you're able to give us any more logs or the issue persists.

@zeripath commented on GitHub (Jun 23, 2021): Without further information we are unable to help. Please reopen if you're able to give us any more logs or the issue persists.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/gitea#6992