gitea: Respository's home page not updated after first push

  • Gitea version (or commit ref): 1.4.0+rc1
  • Git version: 1.7.10.4
  • Operating system: debian 7.11 (wheezy)
  • Database (use [x]):
    • PostgreSQL
    • MySQL
    • MSSQL
    • SQLite
  • Can you reproduce the bug at https://try.gitea.io:
    • Yes (provide example URL)
    • No
    • Not relevant
  • Log gist:

Description

In brief

Repository’s home page not updated after first push.

Reproduce

On vagrant, host: ubuntu 17.10, guest: debian 7.11

  1. On your fresh 1.4.0+rc1 version of Gitea create a regular user let’s say spam and login
  2. Create a new repo, let’s say eggnbacon.
  3. Clone this repo (only tested with http…) on your local git clone http://192.168.100.10:3000/spam/eggnbacon /tmp/eggnbacon (obviously this IP works on my setup only).
  4. Create new file and commit cd /tmp/eggnbacon && touch yay && git add yay && git commit -m "yay".
  5. Push git push origin master, type credentials, validate.
  6. Check http://192.168.100.10:3000/spam/eggnbacon (still looks like a brand new repo).
  7. Create any kind of new commit, add, commit, push: Frontend updated.

Insights

  • It does not looks like to be related to the number of commits, but by the fact you pushed only one time (you can create 2 or 10 commits before first push and got the same behavior)
  • “content”, “code”, does not change anything, same workaround with git commit --allow-empty -m "SPAM!" does the exact same.
  • git push -f after first push (so Everything up-to-date) doesn’t change anything (as expected…)

Let’s be honest

I have to admit Gitea is grumbling at me:

[...io/gitea/cmd/hook.go:66 hookSetup()] [E] LFS server support needs at least Git v2.1.2

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 😕

About this issue

  • Original URL
  • State: closed
  • Created 6 years ago
  • Comments: 61 (16 by maintainers)

Most upvoted comments

Can you please verify that directory where gitea repsitories are stored does not have noexec flag for filesystem? Please provide output of cat /proc/mounts

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 withgit commit --amend && git push -fetc. works

Note: UPDATE gitea.repository SET is_empty = ‘0’ is now the clue

Hi,

quick way to fix this is to open the DB, update is_Bare colom in repository table to 0

SQL code UPDATE gitea.repository SET is_bare = ‘0’ WHERE repository.id = 11;

@monkeyhybrid That’s really great news 😃

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!

Check your git version; this stems from git for-each-ref in the git package. I added an extra debugging log line to get this nugget in my log:

gitea[31211]: [Macaron] 2018-05-24 13:53:56: Completed POST /api/internal/push/update 500 Internal Server Error in 12.686445ms
gitea[31211]: 2018/05/24 13:53:56 [...acaron.v1/context.go:79 Invoke()] [E] newCommit.CommitsBeforeLimit: exit status 129 - error: unknown option `contains'
gitea[31211]: usage: git for-each-ref [options] [<pattern>]
gitea[31211]: -s, --shell           quote placeholders suitably for shells
...

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 git2u from IUS (https://ius.io).

First test SSH:

  1. Create git repo in gitea web interface
  2. Push already existing repo from local machine to remote gitea instance
  3. Nothing happens on gitea interface. Tried multiple browsers etc.

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'

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.