The api/v1/repos/owner/repos/raw/file always return 404 #136

Closed
opened 2025-11-02 03:10:21 -06:00 by GiteaMirror · 4 comments
Owner

Originally created by @HZ89 on GitHub (Dec 20, 2016).

gitea log

2016/12/20 19:06:04 [...ules/context/repo.go:431 func1()] [E] RepoRef invalid repo: branch or tag not exist: refs/tags/v0.0.9/.drone.yml

but the file is exist

another debug log

[Macaron] 2016-12-19 20:05:13: Started GET /api/v1/repos/RPM_Builder/Youzu_RPMs/raw/refs/tags/v0.0.7/.drone.yml for 10.6.32.11
2016/12/19 20:05:13 [D] Session ID: baa92b60ead96381
2016/12/19 20:05:13 [D] CSRF Token: EFH7ydblUs6lrf4dWQiBukuE7Tw6MTQ4MjE0OTExMzcyOTI2Mjk0Mg==
[git-module] /data/gitlab/ceph/gogs/rpm_builder/youzu_rpms.git: git show-ref --verify refs/heads/refs
[git-module] /data/gitlab/ceph/gogs/rpm_builder/youzu_rpms.git: git show-ref --verify refs/tags/refs
[git-module] /data/gitlab/ceph/gogs/rpm_builder/youzu_rpms.git: git show-ref --verify refs/heads/refs/tags
[git-module] /data/gitlab/ceph/gogs/rpm_builder/youzu_rpms.git: git show-ref --verify refs/tags/refs/tags
[git-module] /data/gitlab/ceph/gogs/rpm_builder/youzu_rpms.git: git show-ref --verify refs/heads/refs/tags/v0.0.7
[git-module] /data/gitlab/ceph/gogs/rpm_builder/youzu_rpms.git: git show-ref --verify refs/tags/refs/tags/v0.0.7
[git-module] /data/gitlab/ceph/gogs/rpm_builder/youzu_rpms.git: git show-ref --verify refs/heads/refs/tags/v0.0.7/.drone.yml
[git-module] /data/gitlab/ceph/gogs/rpm_builder/youzu_rpms.git: git show-ref --verify refs/tags/refs/tags/v0.0.7/.drone.yml
[git-module] /data/gitlab/ceph/gogs/rpm_builder/youzu_rpms.git: git show-ref --verify refs/heads/refs/tags/v0.0.7/.drone.yml
[git-module] /data/gitlab/ceph/gogs/rpm_builder/youzu_rpms.git: git show-ref --verify refs/tags/refs/tags/v0.0.7/.drone.yml
2016/12/19 20:05:13 [...ules/context/repo.go:431 func1()] [E] RepoRef invalid repo: branch or tag not exist: refs/tags/v0.0.7/.drone.yml
2016/12/19 20:05:13 [D] Template: status/404
Originally created by @HZ89 on GitHub (Dec 20, 2016). gitea log ``` 2016/12/20 19:06:04 [...ules/context/repo.go:431 func1()] [E] RepoRef invalid repo: branch or tag not exist: refs/tags/v0.0.9/.drone.yml ``` but the file is exist another debug log ``` [Macaron] 2016-12-19 20:05:13: Started GET /api/v1/repos/RPM_Builder/Youzu_RPMs/raw/refs/tags/v0.0.7/.drone.yml for 10.6.32.11 2016/12/19 20:05:13 [D] Session ID: baa92b60ead96381 2016/12/19 20:05:13 [D] CSRF Token: EFH7ydblUs6lrf4dWQiBukuE7Tw6MTQ4MjE0OTExMzcyOTI2Mjk0Mg== [git-module] /data/gitlab/ceph/gogs/rpm_builder/youzu_rpms.git: git show-ref --verify refs/heads/refs [git-module] /data/gitlab/ceph/gogs/rpm_builder/youzu_rpms.git: git show-ref --verify refs/tags/refs [git-module] /data/gitlab/ceph/gogs/rpm_builder/youzu_rpms.git: git show-ref --verify refs/heads/refs/tags [git-module] /data/gitlab/ceph/gogs/rpm_builder/youzu_rpms.git: git show-ref --verify refs/tags/refs/tags [git-module] /data/gitlab/ceph/gogs/rpm_builder/youzu_rpms.git: git show-ref --verify refs/heads/refs/tags/v0.0.7 [git-module] /data/gitlab/ceph/gogs/rpm_builder/youzu_rpms.git: git show-ref --verify refs/tags/refs/tags/v0.0.7 [git-module] /data/gitlab/ceph/gogs/rpm_builder/youzu_rpms.git: git show-ref --verify refs/heads/refs/tags/v0.0.7/.drone.yml [git-module] /data/gitlab/ceph/gogs/rpm_builder/youzu_rpms.git: git show-ref --verify refs/tags/refs/tags/v0.0.7/.drone.yml [git-module] /data/gitlab/ceph/gogs/rpm_builder/youzu_rpms.git: git show-ref --verify refs/heads/refs/tags/v0.0.7/.drone.yml [git-module] /data/gitlab/ceph/gogs/rpm_builder/youzu_rpms.git: git show-ref --verify refs/tags/refs/tags/v0.0.7/.drone.yml 2016/12/19 20:05:13 [...ules/context/repo.go:431 func1()] [E] RepoRef invalid repo: branch or tag not exist: refs/tags/v0.0.7/.drone.yml 2016/12/19 20:05:13 [D] Template: status/404 ```
GiteaMirror added the issue/not-a-bug label 2025-11-02 03:10:21 -06:00
Author
Owner

@tboerger commented on GitHub (Dec 20, 2016):

Where do you get this URL from?

@tboerger commented on GitHub (Dec 20, 2016): Where do you get this URL from?
Author
Owner

@tboerger commented on GitHub (Dec 20, 2016):

I will mark this issue for now as a bug, but I'm not sure if it really is...

@tboerger commented on GitHub (Dec 20, 2016): I will mark this issue for now as a bug, but I'm not sure if it really is...
Author
Owner

@HZ89 commented on GitHub (Dec 20, 2016):

i think it is same with #420

@HZ89 commented on GitHub (Dec 20, 2016): i think it is same with #420
Author
Owner

@tboerger commented on GitHub (Dec 20, 2016):

You are just calling the wrong URL, just drop refs/tags/ and it works, e.g. https://try.gitea.io/api/v1/repos/tboerger/test/raw/v1.0.0/README.md

@tboerger commented on GitHub (Dec 20, 2016): You are just calling the wrong URL, just drop `refs/tags/` and it works, e.g. https://try.gitea.io/api/v1/repos/tboerger/test/raw/v1.0.0/README.md
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/gitea#136