mirror of
https://github.com/go-gitea/gitea.git
synced 2026-03-22 22:45:27 -05:00
When creating repo without init it shows still howto #1238
Closed
opened 2025-11-02 03:53:21 -06:00 by GiteaMirror
·
36 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
v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1
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/question
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#1238
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 @ronnicek on GitHub (Nov 12, 2017).
5abd1d2[x]):https://ncry.pt/p/VfKn#hZGWhGd1lY4mCeABs78BHL-Kn570v07pvFC9Fy2htjM
Description
Using latest gitea/gitea docker image. When I create new repository, but do not initialize it on server it shows howto push it from client. So I create repository, add all files, commit it to git, push it to remote according to howto but nothing shows on web (but code is there) - I tried to clone files locally to different folder. On Discord with lafriks we find out that I have to change is_bare to f in postgres then it's working, but he was not able to reproduce it (and for him it changes to is_bare to f when he push something)
Screenshots
@lunny commented on GitHub (Nov 13, 2017):
Can not reproduce that locally.
@ronnicek commented on GitHub (Nov 13, 2017):
Is there any way how I can debug it more from my side?
@lunny commented on GitHub (Nov 13, 2017):
Could you find the xorm.log to put it also on gist?
@ghost commented on GitHub (Nov 14, 2017):
I'm still having this issue over at #2665 - You can fix it for individual repos by editing your database manually, but I still haven't figured out where the error's coming from.
@ronnicek commented on GitHub (Nov 14, 2017):
Here is the log: https://ncry.pt/p/ugKn#B9sqCgoGCJzWgHYb-GljnXP20lKkGDxfr9DrcsWBrws
@cathalgarvey yep, I know you can fix it manually.. bt that´s actually not what I am looking for :))
@smaeul commented on GitHub (Jan 5, 2018):
repo.IsBareis only updated in once place, inCommitRepoAction:f2e20c81b6/models/action.go (L527)This function is called by
models.pushUpdate, which is called bymodels.PushUpdate, which is the implementation of the internal API endpoint/push/update, created in1773e88643. Once again this is only called from one place:9ddbbd9d5a/cmd/hook.go (L203)which is the implementation for thegitea hookcommand. This command is run from the$REPO/hooks/post-receive.d/giteascript, which is called from the$REPO/hooks/post-receivewrapper, which is (finally) run bygitwhen pushing overssh.This means that if for some reason git hooks are not getting called, or some program they depend on is missing, the
IsBarestate of the repository will never get updated in the web UI.In my case the problem was having my repo storage on a ZFS dataset mounted
noexec. Since git has a "feature" of treating non-executable hooks as disabled, andnoexecappears exactly as if execute permission was missing from the file, there's no warning message fromgitthat the hook is ignored.After remounting the filesystem
execand pushing new commits (by deleting and recreating a branch), the web UI updated as expected.@ronnicek commented on GitHub (Jan 5, 2018):
Hi @smaeul,
Wow, such a detailed and great explanation. Many thanks! Yes, I have filesystem mounted with noexec, so that could be the issue. I will give it a try tonight and report if it's working or not.
@ghost commented on GitHub (Jan 30, 2018):
Same error here. I push in a bare repo via HTTP, not via SSH.
So I need to update the bare flag manually. Is here a solution for this?
@JohannesBauer97 commented on GitHub (Feb 2, 2018):
Same error
@abatkin commented on GitHub (Jun 3, 2018):
I seem to be able to reproduce this. But no Docker and no crazy filesystems (regular ext4, no special mount options). It's late now, will see what I can figure out another day.
@abatkin commented on GitHub (Jun 4, 2018):
This has to do with git version, and gitea is broken on older versions.
On a Centos 7 box, git (1.8.3.1) does not support the
--containsoption togit for-each-ref. Gitea uses this internally for something. There's also probably some type of bug with Gitea itself, since the command must be failing, but the logs (even in Trace mode, but you'd think it should be there even in Info) say nothing.Gitea runs something like:
If you replace the ref with a real ref, and run on a "modern" git, it will work, but with an older git, it will fail (and yes, with a non-zero exit code).
The only hint that something is going wrong in Gitea is, if you run with log level Trace, something that looks like:
Sorry I can't be of more help in debugging (or even fixing this), but I've only just started on my journey learning Go, and I know very little about the architecture of Gitea - this is what I've been able to glean in about 10 minutes of poking through the code.
My suggestions going forward:
@lafriks commented on GitHub (Jun 4, 2018):
I think this should be fixed by #4059
@perpetual-hydrofoil commented on GitHub (Aug 18, 2018):
Seems to still be a problem:
Gitea version
b1ad573built with: bindata, sqliteI haven't run the sqlite changes yet - instead, I just upgraded gitea. When I ran into this with a repo again, I just deleted the empty repo, recreated, and re-pushed. Still seeing the HOWTO.
@ronnicek commented on GitHub (Aug 18, 2018):
And filesystem from which gitea is running doesnt have noexec option?
@confusedsushi commented on GitHub (Oct 9, 2018):
I also observing this issue.
Tested with 1.5.1 and
fb3954f.Host is a Windows Server 2012 R2 on NTFS. Database is sqlite. Updating the Database manually is resolving this.
@lafriks commented on GitHub (Oct 9, 2018):
Check gitea.log for errors
@confusedsushi commented on GitHub (Oct 9, 2018):
pushed something here
@pcopissa commented on GitHub (Oct 9, 2018):
I have the same symptoms (nothing shows up in the repository home page, even after two pushes).
I can use the git client (push, clone etc..) and the files are indeed stored (and updated) in the objects directory. But the web UI shows no commit.
Server side
Client side
@confusedsushi commented on GitHub (Oct 9, 2018):
It seems that the hook which should update the database is not executed always. While evaluating, I ran multiple times into this issue, but somehow the push on the production system did not had this issue.
@pcopissa commented on GitHub (Oct 10, 2018):
I installed yesterday's version (gitea 1.5.2). For a good measure, I disabled SELinux (
setenforce 0) and set the log to Trace then restarted gitea service (systemctl restart gitea).Nada. The web UI remains unchanged.
The log does not move when making a push (dunno if this is expected though ?).
Is there a simple way to test that the hooks are indeed called (simpler than inserting some extra lines to trace entry and exit in a custom log file) ?
@pcopissa commented on GitHub (Oct 10, 2018):
I further fiddled with gitea 1.5.2:
giteaservice, removed all subfolders of/var/lib/git, removed second level files and subfolders of/var/lib/gitea, removed/etc/gitea/app.ini, dropped databasegiteaand recreated it)systemctl start gitea) and navigated to the home page, which asks for config stuff.admin" by the way)readme.mdetc...) which I did not do in the previous attempts (in other words, I had until now left the checkbox in its default state unchecked).So the issue of the frozen repository page seems correlated to the fact that the offending repository started completely empty. When pre-populated with the
readme.mdetc.. it did not happen.I now have to figure out how to close an issue via commit / push.
@perpetual-hydrofoil commented on GitHub (Oct 10, 2018):
@pcopissa This is what I see as well. You have to create a README/.gitignore inside the UI to get it working; you can't just push to the empty repo and then expect the UI to pick up on your changes. :(
(and, yes, @ronnicek it's the root filesystem) btw, @lafriks this should probably be re-opened?
@lunny commented on GitHub (Oct 10, 2018):
Still cannot reproduce on MacOS
@pcopissa commented on GitHub (Oct 10, 2018):
For the record, I enabled SELinux again (
setenforce 1) and modifications to the files are shown in the web UI.@perpetual-hydrofoil commented on GitHub (Oct 10, 2018):
@pcopissa this issue only appears to impact brand new repos (including on non-SELinux distros). Do you still see this after:
If you are still having the issue, your initial push will not show up in the web UI (it'll look as if the git repo is empty)
@pcopissa commented on GitHub (Oct 10, 2018):
@jamiesonbecker I confirm I just ran step 1 and 2 above and the web UI shows no file.
Interestingly, GitExtension understood that situation and proposed to create a
.gitignorefile for me (which I declined)..gitignorein the working copy, then add + commit + push. Web UI remains unresponsive (as before)README.mdfrom the client. Web UI remains unresponsive as before. And I should add, the content of that pushedREADME.mdis not shown in the home page.@perpetual-hydrofoil commented on GitHub (Oct 10, 2018):
@pcopissa hmm, maybe creating
.gitignoreisn't enough... might be thatREADME.mdhas to be created in the UI at initial creation..@pcopissa commented on GitHub (Oct 10, 2018):
This issue is particularly annoying because it is the direct result of leaving the web UI defaults unchanged when creating a new repository. This is a perfect way of discouraging people evaluating the software to continue.
I therefore suggest (as a mitigation, not as a fix) to change the default value of the checkbox "Initialize Repository (Adds .gitignore, License and Readme)" to be checked. That way, newbies like me will hopefully be less likely to get bitten by that bug...
@perpetual-hydrofoil commented on GitHub (Oct 10, 2018):
Agreed - of course, adding a file seems to make it more difficult to push an existing repo with a git history of its own.
@pcopissa commented on GitHub (Oct 10, 2018):
I now have to deal with something that looks like issue #3848...
@nandoflorestan commented on GitHub (Aug 19, 2019):
@lafriks
I think you should reopen this issue because it certainly isn't gone...
I am having the problem with gitea 1.9.1 on CentOS, git 2.21.0, filesystem is NOT noexec.
Please advise...
@MaciejKucia commented on GitHub (Sep 19, 2019):
Reproducible on Gitea Version: 1.9.3
@lunny commented on GitHub (Sep 19, 2019):
Please fire another issue and give more detail there.
@nicos68 commented on GitHub (Oct 1, 2020):
Same for me:
I'm running the docker image below on a raspberry pi 3 and the /data directory is mounted on a USB external ssd.
https://hub.docker.com/r/kunde21/gitea-arm
@ghost commented on GitHub (Oct 1, 2020):
Have you ensured that your SSD partition is not flagged "noexec", as I documented above? Gitea relies on executable hooks in the git repositories, if the partition does not permit these to execute then the operations will fail within the shelled-out "git" command in a way that doesn't give great tracebacks to Gitea. This was the cause of my problem.
Securely sent with Tutanota. Get your own encrypted, ad-free mailbox:
https://tutanota.com
1 Oct 2020, 08:25 by notifications@github.com:
@nicos68 commented on GitHub (Oct 11, 2020):
Well, I first tested just after changing my fstab file with no luck, but I just made another test after restarting the pi and now it works, so I guess you can forget my comment, sorry.