Pushes via deployment write keys do not trigger reindex #1697

Closed
opened 2025-11-02 04:10:01 -06:00 by GiteaMirror · 10 comments
Owner

Originally created by @mqudsi on GitHub (Apr 14, 2018).

Description

It seems pushes to repos with rw deployment keys do not trigger a reindex of the repo or the "commit" event.

  1. Create repo
  2. Add deployment key with write access
  3. Push to repo with deployment key
  4. webui does not reflect changes, repo continues to show as if new

Reproduced on try.gitea: https://try.gitea.io/mqudsi/test-deploy
That repo appears blank, but it has content.

Originally created by @mqudsi on GitHub (Apr 14, 2018). <!-- 1. Please speak English, this is the language all of us can speak and write. 2. Please ask questions or configuration/deploy problems on our Discord server (https://discord.gg/NsatcWJ) or forum (https://discourse.gitea.io). 3. Please take a moment to check that your issue doesn't already exist. 4. Please give all relevant information below for bug reports, because incomplete details will be handled as an invalid report. --> - Gitea version (or commit ref): `38a9cda` - Git version: n/a - Operating system: n/a - Database (use `[x]`): n/a - [ ] PostgreSQL - [ ] MySQL - [ ] MSSQL - [ ] SQLite - Can you reproduce the bug at https://try.gitea.io: - [X] Yes: https://try.gitea.io/mqudsi/test-deploy - [ ] No - [ ] Not relevant - Log gist: ## Description It seems pushes to repos with rw deployment keys do not trigger a reindex of the repo or the "commit" event. 1. Create repo 2. Add deployment key with write access 3. Push to repo with deployment key 4. webui does not reflect changes, repo continues to show as if new Reproduced on try.gitea: https://try.gitea.io/mqudsi/test-deploy That repo *appears* blank, but it has content.
GiteaMirror added the type/bug label 2025-11-02 04:10:01 -06:00
Author
Owner

@bjoe2k4 commented on GitHub (Sep 15, 2018):

This bug just hit me hard and took me hours to realize what the problem was. Any update on this?

@bjoe2k4 commented on GitHub (Sep 15, 2018): This bug just hit me hard and took me hours to realize what the problem was. Any update on this?
Author
Owner

@stale[bot] commented on GitHub (Jan 9, 2019):

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs during the next 2 weeks. Thank you for your contributions.

@stale[bot] commented on GitHub (Jan 9, 2019): This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs during the next 2 weeks. Thank you for your contributions.
Author
Owner

@lunny commented on GitHub (Jan 9, 2019):

@bjoe2k4 need more investigation.

@lunny commented on GitHub (Jan 9, 2019): @bjoe2k4 need more investigation.
Author
Owner

@dakira commented on GitHub (Jan 31, 2019):

I'm using the latest HEAD and have the exact same problem. Using read/write deploy keys, the cache is not invalidated when pushing, using a user key, it is. Can I help investigating @lunny?

@dakira commented on GitHub (Jan 31, 2019): I'm using the latest HEAD and have the exact same problem. Using read/write deploy keys, the cache is not invalidated when pushing, using a user key, it is. Can I help investigating @lunny?
Author
Owner

@zeripath commented on GitHub (Jan 31, 2019):

This is pushing with SSH keys?

I bet the environment variables for the hooks aren't being set properly.

@zeripath commented on GitHub (Jan 31, 2019): This is pushing with SSH keys? I bet the environment variables for the hooks aren't being set properly.
Author
Owner

@mqudsi commented on GitHub (Feb 1, 2019):

Not regular ssh key push, pushing with rw-enabled deployment keys.

@mqudsi commented on GitHub (Feb 1, 2019): Not regular ssh key push, pushing with rw-enabled deployment keys.
Author
Owner

@zeripath commented on GitHub (Feb 2, 2019):

Yep, taking a look at gitea cmd/serv.go the environment settings aren't properly set.

@zeripath commented on GitHub (Feb 2, 2019): Yep, taking a look at gitea cmd/serv.go the environment settings aren't properly set.
Author
Owner

@zeripath commented on GitHub (Feb 2, 2019):

I've pushed a branch to github but not opened a PR just yet until I've had a chance to test it

@zeripath commented on GitHub (Feb 2, 2019): I've pushed a branch to github but not opened a PR just yet until I've had a chance to test it
Author
Owner

@lunny commented on GitHub (Feb 3, 2019):

@mqudsi maybe you can confirm that #5935 fix this issue.

@lunny commented on GitHub (Feb 3, 2019): @mqudsi maybe you can confirm that #5935 fix this issue.
Author
Owner

@dakira commented on GitHub (Feb 5, 2019):

@lunny I can confirm this fixes the issue.

@dakira commented on GitHub (Feb 5, 2019): @lunny I can confirm this fixes the issue.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/gitea#1697