mirror of
https://github.com/go-gitea/gitea.git
synced 2026-03-15 20:52:52 -05:00
Respository's home page not updated after first push #1502
Closed
opened 2025-11-02 04:02:45 -06:00 by GiteaMirror
·
61 comments
No Branch/Tag Specified
main
release/v1.25
release/v1.24
release/v1.23
release/v1.22
release/v1.21
release/v1.20
release/v1.19
release/v1.18
release/v1.17
release/v1.16
release/v1.15
release/v1.14
release/v1.13
release/v1.12
release/v1.11
release/v1.10
release/v1.9
release/v1.8
v1.25.3
v1.25.2
v1.25.1
v1.25.0
v1.24.7
v1.25.0-rc0
v1.26.0-dev
v1.24.6
v1.24.5
v1.24.4
v1.24.3
v1.24.2
v1.24.1
v1.24.0
v1.23.8
v1.24.0-rc0
v1.25.0-dev
v1.23.7
v1.23.6
v1.23.5
v1.23.4
v1.23.3
v1.23.2
v1.23.1
v1.23.0
v1.23.0-rc0
v1.24.0-dev
v1.22.6
v1.22.5
v1.22.4
v1.22.3
v1.22.2
v1.22.1
v1.22.0
v1.23.0-dev
v1.22.0-rc1
v1.21.11
v1.22.0-rc0
v1.21.10
v1.21.9
v1.21.8
v1.21.7
v1.21.6
v1.21.5
v1.21.4
v1.21.3
v1.21.2
v1.20.6
v1.21.1
v1.21.0
v1.21.0-rc2
v1.21.0-rc1
v1.20.5
v1.22.0-dev
v1.21.0-rc0
v1.20.4
v1.20.3
v1.20.2
v1.20.1
v1.20.0
v1.19.4
v1.21.0-dev
v1.20.0-rc2
v1.20.0-rc1
v1.20.0-rc0
v1.19.3
v1.19.2
v1.19.1
v1.19.0
v1.19.0-rc1
v1.20.0-dev
v1.19.0-rc0
v1.18.5
v1.18.4
v1.18.3
v1.18.2
v1.18.1
v1.18.0
v1.17.4
v1.18.0-rc1
v1.19.0-dev
v1.18.0-rc0
v1.17.3
v1.17.2
v1.17.1
v1.17.0
v1.17.0-rc2
v1.16.9
v1.17.0-rc1
v1.18.0-dev
v1.16.8
v1.16.7
v1.16.6
v1.16.5
v1.16.4
v1.16.3
v1.16.2
v1.16.1
v1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
v1.3.2
v1.3.1
v1.3.0
v1.3.0-rc2
v1.3.0-rc1
v1.2.3
v1.2.2
v1.2.1
v1.2.0
v1.2.0-rc3
v1.2.0-rc2
v1.1.4
v1.2.0-rc1
v1.1.3
v1.1.2
v1.1.1
v1.1.0
v1.0.2
v1.0.1
v1.0.0
v0.9.99
Labels
Clear labels
$20
$250
$50
$500
backport/done
💎 Bounty
docs-update-needed
good first issue
hacktoberfest
issue/bounty
issue/confirmed
issue/critical
issue/duplicate
issue/needs-feedback
issue/not-a-bug
issue/regression
issue/stale
issue/workaround
lgtm/need 2
modifies/api
modifies/translation
outdated/backport/v1.18
outdated/theme/markdown
outdated/theme/timetracker
performance/bigrepo
performance/cpu
performance/memory
performance/speed
pr/breaking
proposal/accepted
proposal/rejected
pr/wip
pull-request
reviewed/wontfix
💰 Rewarded
skip-changelog
status/blocked
topic/accessibility
topic/api
topic/authentication
topic/build
topic/code-linting
topic/commit-signing
topic/content-rendering
topic/deployment
topic/distribution
topic/federation
topic/gitea-actions
topic/issues
topic/lfs
topic/mobile
topic/moderation
topic/packages
topic/pr
topic/projects
topic/repo
topic/repo-migration
topic/security
topic/theme
topic/ui
topic/ui-interaction
topic/ux
topic/webhooks
topic/wiki
type/bug
type/deprecation
type/docs
type/enhancement
type/feature
type/miscellaneous
type/proposal
type/question
type/refactoring
type/summary
type/testing
type/upstream
Mirrored from GitHub Pull Request
No Label
type/bug
Milestone
No items
No Milestone
Projects
Clear projects
No project
No Assignees
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: github-starred/gitea#1502
Reference in New Issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @arount on GitHub (Feb 5, 2018).
1.4.0+rc11.7.10.4debian 7.11 (wheezy)[x]):Description
In brief
Repository's home page not updated after first push.
Reproduce
On vagrant, host:
ubuntu 17.10, guest:debian 7.111.4.0+rc1version of Gitea create a regular user let's sayspamand logineggnbacon.git clone http://192.168.100.10:3000/spam/eggnbacon /tmp/eggnbacon(obviously this IP works on my setup only).cd /tmp/eggnbacon && touch yay && git add yay && git commit -m "yay".git push origin master, type credentials, validate.Insights
git commit --allow-empty -m "SPAM!"does the exact same.git push -fafter first push (soEverything up-to-date) doesn't change anything (as expected..)Let's be honest
I have to admit Gitea is grumbling at me:
When I push. But it grumbles always that, not only on first push, so I'm not sure it's related.
Hope to not report something already reported, I've didn't digged in all issues :/
@vfricou commented on GitHub (Feb 5, 2018):
+1 here. Same things with self deployed 1.4.0-rc1. (Updated from 1.3.2)
@lafriks commented on GitHub (Feb 5, 2018):
Can you reproduce that on https://try.gitea.io/? I can not seem to be able to reproduce that
@arount commented on GitHub (Feb 6, 2018):
@lafriks No, I cannot
@aligator commented on GitHub (Feb 9, 2018):
I have the same issue but only if I push with https. Pushing with ssh works.
Here is a related issue:
https://github.com/go-gitea/gitea/issues/2898
@lordlethis commented on GitHub (Feb 13, 2018):
I'm having the same issue on raspbian (git 2.1.4, mysql 5.5.59). The syslog shows an error when POSTing to
/api/internal/push/update(line 9 in the gist)https://gist.github.com/lordlethis/87ed693593f750077b0096931053288f
@lafriks commented on GitHub (Feb 13, 2018):
@lordlethis Can you please check gitea.log file and give me error at that time in this log file as I can not reproduce it myself
@lordlethis commented on GitHub (Feb 13, 2018):
I don't see anything resembling an error in gitea.log, I'm afraid.
I changed the config to RUN_MODE=dev and log.LEVEL=Trace and updated the previous gist with the new, more verbose output in the syslog, as well as what's in gitea.log.
Should I change anything further for more useful logs?
@Yrek commented on GitHub (Feb 21, 2018):
I have same problem with 1.4.0+rc1.
Running Gitea with Git 2.16 and PostgreSQL 10 on CentOS 7.
For me the problem occurs om both HTTP and SSH.
When checking the xorm.log and hook-logs i can't see any errors.
@lunny commented on GitHub (Feb 22, 2018):
Maybe you can try this
add "LOCAL_ROOT_URL=http://127.0.0.1:3000" in custom/app.ini under "server".@lordlethis commented on GitHub (Feb 26, 2018):
LOCAL_ROOT_URL=http://127.0.0.1:3000/makes no difference, I'm afraid. (It made one without the trailing slash, but just in the form of a new error). The only difference I can find is that some logged URLs switch from localhost to 127.0.0.1:[T] GetProtectedBranchBy: http://127.0.0.1:3000/api/internal/branch/{num}/master(pre-receive.log) and[T] PushUpdate: http://127.0.0.1:3000/api/internal/push/update(post-receive.log)@lordlethis commented on GitHub (Feb 26, 2018):
I went and tried to reproduce the issue by making a fresh install in a VM.
Setup
Install debian jessie. I used the i386 netinst iso. At the end of the installation, it offers some package groups. I used:
run some commands:
put the following into /etc/systemd/system/gitea.service
run gitea
# systemctl start giteaGitea Setup Page
Database
Optional
Admin account
Issue Reproduction
@lafriks commented on GitHub (Mar 21, 2018):
Can you please verify that directory where gitea repsitories are stored does not have
noexecflag for filesystem?Please provide output of
cat /proc/mounts@NyxCode commented on GitHub (Mar 21, 2018):
That fixed it for me!
@mxmehl commented on GitHub (Mar 23, 2018):
So can we close here to finish the 1.4.0 milestone? ;)
@lordlethis commented on GitHub (Mar 23, 2018):
Doesn't appear to do anything for me. :(
Gitea is based in
/var/lib/gitea, repos are in/var/lib/gitea/gitea-repositories/{user}, which is both on the root filesystem.(Random thought: if the repositories were on a noexec filesystem shouldn't the repo home page never update? Because as it is, it updates with the second push, just not with the first one)
@arount commented on GitHub (Mar 23, 2018):
Fixed for me (because of
noexec)@vfricou commented on GitHub (Mar 28, 2018):
Same problem here with upgrade from 1.3.2 to 1.4.0 (stable released), the home repository page update only on second push to repository.
Edit : I'll try with fresh install to test comportment.
Edit 2 : With exact same config, I can't reproduce this issue on new fresh install in v1.4.0.
@lafriks commented on GitHub (Mar 28, 2018):
@vfricou do you see anything bad in gitea.log for first push?
@lordlethis commented on GitHub (Mar 28, 2018):
I can reliably reproduce this, but only in Debian Jessie...
Going from the logs I linked to earlier (https://gist.github.com/lordlethis/87ed693593f750077b0096931053288f), if I'm reading this right
there seems to be some failure while running this git command? (It does fail if I try running it manually, because git for-each-ref does not support --contains with git 2.1.4).
@lafriks commented on GitHub (Mar 28, 2018):
I will try to reproduce this with Debian 8.10
@oidz1234 commented on GitHub (Mar 29, 2018):
I am having this issue as well
Centos7
latest gitea release
git version 1.8.3.1
Sqlite db
I pushed a local repo with 30 + commits in it.
On first push to gitea nothing seemed to happen on the gitea web interface
Nothing bad on first push in the logs, after second commit to remote repo everything works, again nothing entered into the logs.
@vfricou commented on GitHub (Mar 29, 2018):
@lafriks No, I didn't see anything bad… Is the problem… If I see any error or something special, I'll show you…
Effectively, my problem is against on debian jessie release. I'll try to upgrade to stretch release to see if problem persist.
@vfricou commented on GitHub (Mar 29, 2018):
Okay, I confirm this bug is not present after system upgrade to Debian stretch. Is realy proper to Debian Jessie.
@chasgames commented on GitHub (Mar 29, 2018):
Same on centos7
@mxmehl commented on GitHub (Apr 4, 2018):
I can confirm that the issues persists with Debian Jessie. Cannot test Stretch here.
@awwong1 commented on GitHub (Apr 6, 2018):
I can confirm this issue on a Raspberry Pi 3 running the 1.4.0 release.
I'm not sure if the
noexecfix applies to me. I am running thegiteaservice using systemd.EDIT: Clarification to noexec
@Madmorgan007 commented on GitHub (Apr 16, 2018):
Hi,
quick way to fix this is to open the DB, update is_Bare colom in repository table to 0
SQL code
UPDATE
gitea.repositorySETis_bare= '0' WHERErepository.id= 11;@neji0924 commented on GitHub (Apr 27, 2018):
@Madmorgan007 fixed for me!
@awwong1 commented on GitHub (Apr 27, 2018):
@neji0924 I think you can also make an empty commit.
git commit --allow-empty@mxmehl commented on GitHub (Apr 28, 2018):
This, or got an empty
git commit --amendandgit push -f. This way, you don't have two commits but at the cost of rewriting the Git history.Do we already know how the bug is caused in Gitea? It has to be some kind of regression between 1.3.3 and 1.4.0
@mgineer85 commented on GitHub (May 2, 2018):
can confirm this issue, too.
I put gitea on an existing openmediavault3 installation.
pushing another empty commit updated the website at once.
@withings-sas commented on GitHub (May 11, 2018):
had the same issue, I had to run the command from @Madmorgan007 comment to fix it (UPDATE gitea.repository SET is_bare = '0')
@IzzySoft commented on GitHub (May 17, 2018):
I can absolutely confirm the "related to number of pushes". I've setup 3 repos – one for each machine I've installed etckeeper on. Initialized etckeeper on all 3 machines, pushed. Figured on one server I needed a slight adjustment, so committed that and pushed again. This was the only repo with 2 pushes – and the only one showing content.
So I pulled the
UPDATE gitea.repository SET is_bare = '0'trick (as that was the only difference I could see), and it worked for the other two. Unfortunately I found this issue here only afterwards, or I had tried to fully confirm by another push …Note: No
noexecinvolved here at all (or the one repo with the 2 pushes couldn't have worked automatically either – but I explicitly checked withmountto make sure). Gitea 1.4.0 here if it matters. Cannot remember having seen this with older versions, when I created my other 20 repos.@hudecof commented on GitHub (May 24, 2018):
+1 in 1.4.0 and 1.4.1.
I still see empty git repository in UI after first push
@oidz1234 commented on GitHub (May 24, 2018):
I still have the issue on latest release
@daviian commented on GitHub (May 24, 2018):
@IzzySoft @hudecof @oidz1234 I can't reproduce that with 1.4.0
Can you describe exactly what steps you do?
If I do:
@IzzySoft commented on GitHub (May 24, 2018):
@daviian I'm currently not "in reach" of my installation to check again – but what I did is:
UPDATE gitea.repository SET is_bare = '0', startup Gitea againAs pointed out, there was a "machine C" where after step 4 I created another commit and pushed. That one went straight to step 7 (i.e. worked as expected).
@daviian commented on GitHub (May 24, 2018):
@IzzySoft Tried it that way but it simply always works for me 🤔
@hudecof commented on GitHub (May 24, 2018):
@IzzySoft described my workflow
@hudecof commented on GitHub (May 24, 2018):
strange, it works as expected right now. I was fighint with one repo all the day
@IzzySoft commented on GitHub (May 24, 2018):
@daviian let's wait for @oidz1234 to report back as well. If I'm the only one left having this issue: I know a work-around (as described). It's not that often that I need to create a new repo in Gitea, so for those few times I can certainly live with that (but will keep an eye on it whenever I create a new repo; maybe we all missed some detail). Though of course it would be nice if it were solved 😉
Just in case the local git version (on the machine running Gitea) is relevant: 2.1.4 here (ARMv7 – it's running on a BananaPi).
@oidz1234 commented on GitHub (May 24, 2018):
First test SSH:
Test 2 HTTP:
Same tests, same results. Nothing on gitea web interface.
Running the below does fix it for the repository.
UPDATE gitea.repository SET is_bare = '0'@daviian commented on GitHub (May 24, 2018):
@IzzySoft I beliebe we all want this bug to be fixed, as long as it indeed is a bug 😂
@oidz1234 I've tested it that way too, but still works for me 😞
@lunny commented on GitHub (May 24, 2018):
any error logs on console or file?
@oidz1234 commented on GitHub (May 24, 2018):
Nope no errors. Any log files you need a dump off ?
@parsley42 commented on GitHub (May 24, 2018):
Check your git version; this stems from
git for-each-refin thegitpackage. I added an extra debugging log line to get this nugget in my log:Even before that, though, I was seeing
[Macaron] 2018-05-24 13:53:56: Completed POST /api/internal/push/update 500 Internal Server Error- not sure why others aren't seeing that.For our CentOS system, I just installed
git2ufrom IUS (https://ius.io).@mgineer85 commented on GitHub (May 24, 2018):
@parsley42 thanks for finding out.
I had problems with that, too. I checked my git version on my openmediavault (debian jessie) and it was 2.1.4 (from 2014). just updated to git 2.17.0.
works perfect from first commit on!
@daviian commented on GitHub (May 24, 2018):
Hey guys,
I've submitted a PR to fix this. Would appreciate if someone of you guys having troubles can test this and if this fixes it!
@IzzySoft commented on GitHub (May 25, 2018):
@mgrl Jessie and Git 2.1.4 here as well. How did you update git? 2.1.4 is the latest the official repo provides.
@mgineer85 commented on GitHub (May 25, 2018):
Added some testing repos somehow I found on stackexchange ;)
Am 25. Mai 2018 07:59:57 schrieb Izzy notifications@github.com:
@hudecof commented on GitHub (May 25, 2018):
I discovered this bug on
1.4.0version. I upgraded to the1.4.1yetsreday, but I need to do manual fix to resolve it. All tests I did was on new1.4.1version.I'm using latest /all updates/ Debian 9.4 (stretch)
@daviian commented on GitHub (May 25, 2018):
@hudecof Can you provide the gitea.log like @parsley42
@hudecof commented on GitHub (May 25, 2018):
@daviian there's nothing in my gitea.log file ;( just
[I]messages@daviian commented on GitHub (May 25, 2018):
@hudecof Too bad. Debian stretch provides git in version 2.11.0 so the
git for-each-refcommand should definitely work.Can you run the git command manually on this system on a repo?
git for-each-ref --count=10 --format='%(refname)' --contains <any-commit-hash> /refs/heads/@daviian commented on GitHub (May 27, 2018):
@mgrl @IzzySoft @parsley42
Would you be so kind as to test if the issue is solved with the newly created PR?
@IzzySoft commented on GitHub (May 27, 2018):
@daviian only after it has been released, sorry. I'm running the "one-off binary" on a Pi, no way to use Go directly or to compile it.
@daviian commented on GitHub (May 27, 2018):
@IzzySoft We also build latest binaries from master branch, see https://dl.gitea.io/gitea/master/
If you wait til tomorrow the newest commits should be released as well.
@monkeyhybrid commented on GitHub (May 28, 2018):
@daviian I was also experiencing this issue and can confirm, for me at least, it is solved with the latest master build (05/28/2018 03:48:12 PM).
This is on Debian Jessie host, with Git 2.1.4.
@daviian commented on GitHub (May 28, 2018):
@monkeyhybrid That's really great news :)
@metalbote commented on GitHub (Feb 26, 2019):
I am running latest gitea in docker, and seeing this issue as well. The mentioned fix with update is_bare cannot be applied because there isn't a is_bare column in table repositories.... workaround with
git commit --amend&&git push -fetc. worksNote: UPDATE
gitea.repositorySETis_empty= '0' is now the clue@nandoflorestan commented on GitHub (Aug 19, 2019):
OK, so why is an issue that is seen repetitively (I am also affected, and noexec isn't it) appearing as CLOSED???