Gitea action not working whenever gitea instance running under subpath #12327

Closed
opened 2025-11-02 10:05:47 -06:00 by GiteaMirror · 8 comments
Owner

Originally created by @Shakthijuego on GitHub (Jan 11, 2024).

Description

My repo located at https://giteainstance.com/git/user/repo. Checkout action for gitea action failed with error
fatal: repository 'https:///giteainstance.com/user/repo/' not found

Gitea Version

1.21.0

Can you reproduce the bug on the Gitea demo site?

No

Log Gist

No response

Screenshots

No response

Git Version

No response

Operating System

No response

How are you running Gitea?

Behind nginx under subpath

Database

None

Originally created by @Shakthijuego on GitHub (Jan 11, 2024). ### Description My repo located at https://giteainstance.com/git/user/repo. Checkout action for gitea action failed with error `fatal: repository 'https:///giteainstance.com/user/repo/' not found` ### Gitea Version 1.21.0 ### Can you reproduce the bug on the Gitea demo site? No ### Log Gist _No response_ ### Screenshots _No response_ ### Git Version _No response_ ### Operating System _No response_ ### How are you running Gitea? Behind nginx under subpath ### Database None
GiteaMirror added the type/bug label 2025-11-02 10:05:47 -06:00
Author
Owner

@lng2020 commented on GitHub (Jan 12, 2024):

reference https://github.com/actions/checkout/issues/1242
actions/checkout just does not support the subpath yet.
maybe there is a fork of actions/checkout supports subpath?

@lng2020 commented on GitHub (Jan 12, 2024): reference https://github.com/actions/checkout/issues/1242 `actions/checkout` just does not support the subpath yet. maybe there is a fork of `actions/checkout` supports subpath?
Author
Owner

@Shakthijuego commented on GitHub (Jan 12, 2024):

That seems the case. However just forking action/checkout doesn't seems to fix. Service prefix even being ignored in gitea action runner. Remote gitea action not being handled properly.

- name: Check out repository code with subpath
   uses: https://giteainstance.com/git/repo/checkout.git@v3

@Shakthijuego commented on GitHub (Jan 12, 2024): That seems the case. However just forking action/checkout doesn't seems to fix. Service prefix even being ignored in gitea action runner. Remote gitea action not being handled properly. ``` - name: Check out repository code with subpath uses: https://giteainstance.com/git/repo/checkout.git@v3 ```
Author
Owner

@lng2020 commented on GitHub (Jan 12, 2024):

I mean you may find someone fork actions/checkout repo and modify it to support the suburl feature.
for example https://gitea.com/ScMi1/checkout (I haven't tried this so I'm not sure it works)
However, I think this issue can be closed. Any further thoughts?

@lng2020 commented on GitHub (Jan 12, 2024): I mean you may find someone fork `actions/checkout` repo and modify it to support the suburl feature. for example https://gitea.com/ScMi1/checkout (I haven't tried this so I'm not sure it works) However, I think this issue can be closed. Any further thoughts?
Author
Owner

@Shakthijuego commented on GitHub (Jan 12, 2024):

Yes thank you. Checkout action got working with 'uses: ischanx/checkout@06c611454073903c9d44641d7e085b21115d3dcf'
I will raise a separate issue for https://gitea.com/gitea/act_runner to support 'uses' command with subpath.

@Shakthijuego commented on GitHub (Jan 12, 2024): Yes thank you. Checkout action got working with 'uses: ischanx/checkout@06c611454073903c9d44641d7e085b21115d3dcf' I will raise a separate issue for https://gitea.com/gitea/act_runner to support 'uses' command with subpath.
Author
Owner

@Shakthijuego commented on GitHub (Jan 12, 2024):

For any ones reference: This code is responsible for ignoring subpath in action. (Search for newRemoteAction) https://gitea.com/gitea/act/src/branch/main/pkg/runner/step_action_remote.go

@Shakthijuego commented on GitHub (Jan 12, 2024): For any ones reference: This code is responsible for ignoring subpath in action. (Search for newRemoteAction) https://gitea.com/gitea/act/src/branch/main/pkg/runner/step_action_remote.go
Author
Owner

@ChristopherHX commented on GitHub (Jan 17, 2024):

This code is responsible for ignoring subpath in action

There is a problem when parsing that, it's simple not easy to find out what is meant.

You have a subpath as part of the uri, actions can reference a subfolder inside the repo.

Could mean both

  • repo: https://giteainstance.com/git/repo
    subfolder: /checkout.git
    version: v3
  • repo: https://giteainstance.com/git/repo/checkout.git (Ambiguous alternative interpretation)
    subfolder: /
    version: v3

Removing subfolder support (case 1) in Gitea Actions, would drop compat with GitHub Actions even more and allows the interpretation you want it to do.

@ChristopherHX commented on GitHub (Jan 17, 2024): > This code is responsible for ignoring subpath in action There is a problem when parsing that, it's simple not easy to find out what is meant. You have a subpath as part of the uri, actions can reference a subfolder inside the repo. > - name: Check out repository code with subpath uses: https://giteainstance.com/git/repo/checkout.git@v3 Could mean both - repo: `https://giteainstance.com/git/repo` subfolder: `/checkout.git` version: `v3` - repo: `https://giteainstance.com/git/repo/checkout.git` (Ambiguous alternative interpretation) subfolder: `/` version: `v3` Removing subfolder support (case 1) in Gitea Actions, would drop compat with GitHub Actions even more and allows the interpretation you want it to do.
Author
Owner

@Shakthijuego commented on GitHub (Jan 19, 2024):

Agree. I am planning to remove subpath in gitea instance or make it work via redirecting in nginx. There seems no other solution.

@Shakthijuego commented on GitHub (Jan 19, 2024): Agree. I am planning to remove subpath in gitea instance or make it work via redirecting in nginx. There seems no other solution.
Author
Owner

@github-actions[bot] commented on GitHub (Mar 1, 2024):

Automatically locked because of our CONTRIBUTING guidelines

@github-actions[bot] commented on GitHub (Mar 1, 2024): Automatically locked because of our [CONTRIBUTING guidelines](https://github.com/go-gitea/gitea/blob/main/CONTRIBUTING.md#issue-locking)
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/gitea#12327