You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
name: 404 when comparing tags
about: The /compare/endpoint balks when comparing tags instead of branch names (offered through the UI)
Describe the bug
When viewing a tag the compare button offers to compare the tag to master, e.g. https://try.gogs.io/RobertKosten/example-project/compare/master...tag, which leads to a 404. It works fine when comparing branches, but tags seem to always fail (tried comparing two tags, tags with only [a-z]+).
Gogs version and commit
Gogs Version: 0.11.91.0811
Go1.12.7
Git version
1.9.1
Operating system
ubuntu 14.04.1
Database
mysql 5.5.62-0ubuntu0.14.04.1
To Reproduce
Steps to reproduce the behavior:
Go to Repository page
Click on 'Branch:master'
Click on 'Tags'
Click on any {tagname}
Click on green compare button to the left on 'Tree: {tagname}'
I can't clone to local (I have added my ssh key, of course):
$ git clone [email protected]:RobertKosten/example-project.git
Cloning into 'example-project'...
ssh: connect to host try.gogs.io port 22: Connection timed out
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.
Dunno if it's something related, but the compare button hardcodes master branch in the generated url even if it doesn't exists. I mean my repo works with main (no master at all), and when trying to compare a fork with the original, the button generates this url:
Activity
unknwon commentedon May 1, 2020
Thanks for the feedback!
Which button? Can you provide a screenshot?
Why can't? You can create "release" which creates a tag or just
git push --tagsfrom your local repository.RobertKosten commentedon May 1, 2020
Thanks for gogs ;-)
Sure, here it is on my local installation:

I have created a release
testone: https://try.gogs.io/RobertKosten/example-project/compare/master...testoneI can't clone to local (I have added my ssh key, of course):
unknwon commentedon May 1, 2020
Turns out to be a problem when requests are proxied by Cloudflare, I have disabled it for try.gogs.io, should work after few hours. 😞
RobertKosten commentedon May 1, 2020
Nice :-P
zhukovra commentedon Oct 8, 2020
@unknwon it isn't any Cloudflare or IIS problem. Steps to reproduce:
/user/repo/compare/branch...tagunknwon commentedon Oct 9, 2020
I was quoting the SSH clone problem of try.gogs.io :) not the bug itself.
oscarmlage commentedon Jan 12, 2022
Dunno if it's something related, but the compare button hardcodes
masterbranch in the generated url even if it doesn't exists. I mean my repo works withmain(nomasterat all), and when trying to compare a fork with the original, the button generates this url:That url gives a 404. But if I change
masterbymainin the url, as the following, it works perfectly:I cound'nt find any config option for changing this as default behaviour.