Failed to push after upgrading to 1.2.3 from 1.1.3 #1209

Closed
opened 2025-11-02 03:52:32 -06:00 by GiteaMirror · 9 comments
Owner

Originally created by @jbub on GitHub (Nov 4, 2017).

Description

After upgrading from 1.1.3 to 1.2.3 i receive and error on push to repo: UpdatePublicKey: Failed to update public key: EOF, i already tried running "Resync pre-receive, update and post-receive hooks of all repositories.", nothing helps.

Thank you

Originally created by @jbub on GitHub (Nov 4, 2017). - Gitea version (or commit ref): 1.2.3 (docker) - Git version: 2.15.0 - Operating system: ubuntu 16.04 (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 - [ ] Not relevant - Log gist: https://gist.github.com/jbub/1900e74fb2625506fcd5cde5f3d669cd ## Description After upgrading from 1.1.3 to 1.2.3 i receive and error on push to repo: `UpdatePublicKey: Failed to update public key: EOF`, i already tried running "Resync pre-receive, update and post-receive hooks of all repositories.", nothing helps. Thank you
GiteaMirror added the type/question label 2025-11-02 03:52:32 -06:00
Author
Owner

@lafriks commented on GitHub (Nov 4, 2017):

Check your local root url value in app.ini

@lafriks commented on GitHub (Nov 4, 2017): Check your local root url value in app.ini
Author
Owner

@jbub commented on GitHub (Nov 4, 2017):

Thank you, seems like i do not specify it so it should be the default of:
LOCAL_ROOT_URL = %(PROTOCOL)s://%(HTTP_ADDR)s:%(HTTP_PORT)s/

@jbub commented on GitHub (Nov 4, 2017): Thank you, seems like i do not specify it so it should be the default of: `LOCAL_ROOT_URL = %(PROTOCOL)s://%(HTTP_ADDR)s:%(HTTP_PORT)s/`
Author
Owner

@jbub commented on GitHub (Nov 4, 2017):

I can see this in the logs:

[Macaron] 2017-11-04 17:30:47: Started POST /api/internal/ssh/17/update for 127.0.0.1
[Macaron] 2017-11-04 17:30:47: Completed /api/internal/ssh/17/update 403 Forbidden in 1.645482ms
@jbub commented on GitHub (Nov 4, 2017): I can see this in the logs: ``` [Macaron] 2017-11-04 17:30:47: Started POST /api/internal/ssh/17/update for 127.0.0.1 [Macaron] 2017-11-04 17:30:47: Completed /api/internal/ssh/17/update 403 Forbidden in 1.645482ms ```
Author
Owner

@lafriks commented on GitHub (Nov 4, 2017):

@jbub does your app.ini file contains INTERNAL_TOKEN? If not gitea needs write permissions to app.ini file at least once when starting to generate it

@lafriks commented on GitHub (Nov 4, 2017): @jbub does your app.ini file contains `INTERNAL_TOKEN`? If not gitea needs write permissions to app.ini file at least once when starting to generate it
Author
Owner

@jbub commented on GitHub (Nov 5, 2017):

Seems like its working now, dont know what happened, did not really change anything. Thanks anyway.

@jbub commented on GitHub (Nov 5, 2017): Seems like its working now, dont know what happened, did not really change anything. Thanks anyway.
Author
Owner

@jbub commented on GitHub (Nov 5, 2017):

@lafriks yes it does have the INTERNAL_TOKEN

@jbub commented on GitHub (Nov 5, 2017): @lafriks yes it does have the `INTERNAL_TOKEN`
Author
Owner

@klingtnet commented on GitHub (Dec 16, 2017):

I've had the same issue:

$ git push
Gitea: Internal error
UpdatePublicKey: Failed to update public key: EOF
error: failed to push some refs to 'gitea@git.klingt.net:alinz/heft.git

the push still succeeded, though.
I could fix this by running Rewrite '.ssh/authorized_keys' file (for Gitea SSH keys). There is no need to do this if you are using the built-in SSH server. from the admin dashboard.

@klingtnet commented on GitHub (Dec 16, 2017): I've had the same issue: ```sh $ git push Gitea: Internal error UpdatePublicKey: Failed to update public key: EOF error: failed to push some refs to 'gitea@git.klingt.net:alinz/heft.git ``` the push still succeeded, though. I could fix this by running `Rewrite '.ssh/authorized_keys' file (for Gitea SSH keys). There is no need to do this if you are using the built-in SSH server.` from the admin dashboard.
Author
Owner

@klingtnet commented on GitHub (Jun 27, 2018):

UPDATE: If anybody still faces this issue—maybe with gitea 1.4.1—then try to restart gitea. Gitea accepted my SSH keys after the restart, again.

@klingtnet commented on GitHub (Jun 27, 2018): UPDATE: If anybody still faces this issue—maybe with gitea 1.4.1—then try to restart gitea. Gitea accepted my SSH keys after the restart, again.
Author
Owner

@yobert commented on GitHub (Sep 5, 2018):

This happened to me also, exactly the same way. Gitea version 1.5, using built in SSH server. After it ran for a week, I had to restart it to get SSH push to work again. Same 403 error on the API calls.

@yobert commented on GitHub (Sep 5, 2018): This happened to me also, exactly the same way. Gitea version 1.5, using built in SSH server. After it ran for a week, I had to restart it to get SSH push to work again. Same 403 error on the API calls.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/gitea#1209