mirror of
https://github.com/go-gitea/gitea.git
synced 2026-07-16 04:42:51 -05:00
sub-branches throw 500 #4705
Closed
opened 2025-11-02 06:00:06 -06:00 by GiteaMirror
·
42 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.16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1.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
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#4705
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 @ThierryBegin on GitHub (Jan 22, 2020).
[x]):Description
I'm able to create a feature/nameoffeature branch but when I try to load it on gitea it throws 500 errors
...
Screenshots
@lunny commented on GitHub (Jan 22, 2020):
@ThierryBegin Could you confirm v1.10.3 still has the problem?
@ThierryBegin commented on GitHub (Jan 22, 2020):
hard to tell, Ill have to find a way to update it in the jail I guess, which isn't simple.
@zeripath commented on GitHub (Jan 22, 2020):
https://try.gitea.io/arandomer/test-9938/src/branch/subfile/subbranch
https://try.gitea.io/arandomer/test-9938/src/branch/subfile/subbranch/subfile
Appears to work on try
@6543 commented on GitHub (Jan 23, 2020):
@ThierryBegin updating gitea should be easy - do you have custom modifications ?!?
@bagasme commented on GitHub (Jan 25, 2020):
@ThierryBegin Did you create the branch from Gitea UI or Git CLI?
@ThierryBegin commented on GitHub (Jan 25, 2020):
@6543 I'm yusing freenas 11.2, the package is outdated for some reason, ill have to figure out something I suppose...
@bagasme both, the result is the same
@ThierryBegin commented on GitHub (Feb 14, 2020):
Finally got back home and I was able to update to 1.10.3, unfortunately, the problem is still there.

@6543 commented on GitHub (Feb 14, 2020):
can you enable develop mode and give us some logs?
@ThierryBegin commented on GitHub (Feb 14, 2020):
sure,
here it goes:
gitea.log
and thx for the help
@greg-ch commented on GitHub (Feb 16, 2020):
I have, the same issue:

@ThierryBegin commented on GitHub (Feb 16, 2020):
I updated Freenas to 11.3 today and decided to try with the community plugin. I couldn't even create a repo until I added
SCRIPT_TYPE=sh
to my app.ini
unfortunately the 500 error is also still there when I try to use sub-branches
@guillep2k commented on GitHub (Feb 17, 2020):
@ThierryBegin, @greg-ch could please confirm that:
master,dev, etc.)? (So we know we need to focus on the sub-branches).For these test try to use only the UI (you can create files and branches from the UI no problem).
@ThierryBegin commented on GitHub (Feb 17, 2020):
@guillep2k
Yes,
@lunny commented on GitHub (Feb 17, 2020):
Have you deleted that branch? Cannot reproduce that on my local instance.
@ThierryBegin commented on GitHub (Feb 17, 2020):
@lunny not sure I understand the question. its a fresh new branch on a fresh new repo @greg-ch have 2 screenshots that show exactly what is happening too.
@lafriks commented on GitHub (Feb 17, 2020):
Could it be FreeBSD related issue?
@ThierryBegin commented on GitHub (Feb 17, 2020):
@lafriks it could be, still need to be fixed tho. especially if the plugin is that easily available to install.
@greg-ch did you had the issue on freebsd too?
@guillep2k commented on GitHub (Feb 18, 2020):
Maybe it's a git version problem? Which version of git are you running?
@greg-ch commented on GitHub (Feb 18, 2020):
I will add that the sub-branch which is on my screenshots and which opens with 500. I created using git flow release .... on FreeBSD 12.1.
@guillep2k commented on GitHub (Feb 18, 2020):
I have no idea what version of git that is. Can you do a
git --versionor go into/admin/configand write down the value?@ThierryBegin commented on GitHub (Feb 18, 2020):
there you go:

again, thx for the help
@guillep2k commented on GitHub (Feb 19, 2020):
By any chance your default branch for that repo is not
master?@ThierryBegin commented on GitHub (Feb 20, 2020):
Default is Master,


@mrsdizzie commented on GitHub (Feb 20, 2020):
The actual error from the log posted above is:
Could be an issue with the local git configuration if there is any (I also can't reproduce this but anybody should at least focus on the real error it's giving).
@ThierryBegin commented on GitHub (Feb 20, 2020):
if it helps, I think this is the git repo with all the install instructions that freebsd need to install the plugin afaik https://github.com/jaf-iocage-plugins/iocage-plugin-gitea
@guillep2k commented on GitHub (Feb 21, 2020):
Yet another question... 😄
You're trying to get branch
releases/xxx1. Is it possible that there also exists a branch or tag named justreleases? Could you please clone the repo and post the results of running...:?
Also, I get that you were able to reproduce with a repo from scratch. Could you please push that repo to
try.gitea.ioto see if it behaves differently over there?@ThierryBegin commented on GitHub (Feb 21, 2020):
git show-ref gave me this:
8b6cf726a1d1a45ebe2394e32290ce513f9b776a refs/heads/master 8b6cf726a1d1a45ebe2394e32290ce513f9b776a refs/remotes/origin/HEAD 8b6cf726a1d1a45ebe2394e32290ce513f9b776a refs/remotes/origin/master 8b6cf726a1d1a45ebe2394e32290ce513f9b776a refs/remotes/origin/test/tasI pushed on gitea.io

seems to be working there...
@guillep2k commented on GitHub (Feb 21, 2020):
Some weird local permissions on the file-system? I don't think it's related, but if the repos are on a no-exec filesystem, Gitea won't work because the hooks won't be able to run.
@fbentouati commented on GitHub (Feb 22, 2020):
Hello,
I don't know If my problem is related to this issue, but I got a similar behavior when I want to display the branch page of my repos.
I don't know why but on my branch settings (on the protected branch section) there are an unknown branch named:
._master. When I want select this unknown branch, I got an error 500.I success to resolve my problem with step below:
On my server, I created the
._masterreference file:Try to select the
._masterbranch on the protected section (without validate the forms).Then remove the
._masterfile previously created:At this moment, the ._master branch seem be deleted from gitea database.
I hope It's can help (If my problem is related to this issue ^^) ...
@ThierryBegin commented on GitHub (Feb 26, 2020):
Unfortuantely @Fredoo404 's fix isn't the one im looking for ;)
I also wen directly in the server folders and couldn't see any issues with with permissions in the ref/heads
the branch folder seem to be empty, not sure if it should or not be... thing is certain the url it point to is src/branch/test2/testtt so I suppose something is missing there
@zeripath commented on GitHub (Mar 4, 2020):
@Fredoo404 are you running on Mac?
@fbentouati commented on GitHub (Mar 5, 2020):
@zeripath Nop, Gitea is hosted on my rasperry (Raspbian stretch).
@zeripath commented on GitHub (Mar 5, 2020):
._files are a feature of Macs - in particular directories viewed through Finder - neither Git nor Gitea makes them.
@fbentouati commented on GitHub (Mar 5, 2020):
Hmm, my workstation is under mac. I have no memories to open gitea data with mac Finder, but it's not impossible because in the past I did many test with docker in local with my gitea data (currently on my rasperry).
thank you for your feedback ;)
@kevans91 commented on GitHub (Apr 23, 2020):
I can confirm seeing this in a fresh FreeBSD 12.1 jail with Gitea 1.11.3/Go 1.14.1/Git 2.26.1 -- I'll see if I can dig into it and figure out what's going on.
@ThierryBegin commented on GitHub (Apr 23, 2020):
Thx, keep us posted, in the meantime I switched to gitlab and it does works flawlessly except for the insane amount of memory it's taking even in idle.
@kevans91 commented on GitHub (Apr 23, 2020):
I've opened https://github.com/go-git/go-git/pull/39, which resolves the underlying problem: given a branch name like
feature/blah, Gitea would attempt toreadReferenceFile('.', 'feature')first. go-git was implicitly relying on the read() of the opened file to fail if it had actually opened a directory, so Gitea would get a false-positive thatfeatureis a branch when it's really not; leading it to stop the search. It would later come to realize thatfeatureis in-fact not the name of a branch.I suspect this can be closed, as the problem lies elsewhere. edit: after-thought, unless Gitea maintainers can be convinced to import the fix if upstream accepts it.
@lunny commented on GitHub (Apr 25, 2020):
@kevans91 Since go-git/go-git#39 merged, could you send a PR and confirm this bug is fixed in FreeBSD?
@kevans91 commented on GitHub (Apr 25, 2020):
Hi,
I sent a PR and was told it can't be merged until a release of go-git is cut that includes it. =( #11208
It does fix the problem on FreeBSD and I've got a patch for our ports system that we can carry locally with no real problem until a new release is made.
@zeripath commented on GitHub (Jun 17, 2020):
So I believe that go-git 5.10 has this fix.
@ThierryBegin commented on GitHub (Jun 17, 2020):
yes I saw the upgraded version in freenas too . we can close this, thx guys!
@zeripath commented on GitHub (Jun 17, 2020):
Will do once the pr above is merged.