Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Gitea Actions fetching from lfs, api error: Authentication required: Unauthorized #23824

Closed
apairon opened this issue Mar 30, 2023 · 0 comments · Fixed by #23841
Closed

Gitea Actions fetching from lfs, api error: Authentication required: Unauthorized #23824

apairon opened this issue Mar 30, 2023 · 0 comments · Fixed by #23841
Assignees
Labels
topic/gitea-actions related to the actions of Gitea type/bug

Comments

@apairon
Copy link

apairon commented Mar 30, 2023

Description

Hi,

I use the new gitea actions feature with a private repo which has lfs usage.

Please note, that I use another docker image because default debian image from your default act_runner config does not have "git lfs" and "yarn" installed.

My testing workflow:

name: deploy to production

on: "push"

jobs:
    deploy:
        name: deploy
        runs-on: ubuntu-latest
        container:
            image: catthehacker/ubuntu:js-latest
        steps:
            - uses: actions/checkout@v3
              with:
                  lfs: true

I think using the other image should not be an issue. I am using your default actions/checkout@v3.

Here is the log of gitea actions web ui:

Resolving deltas:  50% (1/2)
Resolving deltas: 100% (2/2)
Resolving deltas: 100% (2/2), done.
From https://*********
 * [new ref]         4e3676277fe8441ac162714068eb284087a0bbf3 -> origin/master
::endgroup::
::group::Determining the checkout info
::endgroup::
::group::Fetching LFS objects
[command]/usr/bin/git lfs fetch origin refs/remotes/origin/master
fetch: Fetching reference refs/remotes/origin/master
batch response: Authentication required: Unauthorized
batch response: Authentication required: Unauthorized
batch response: Authentication required: Unauthorized
batch response: Authentication required: Unauthorized
batch response: Authentication required: Unauthorized
error: failed to fetch some objects from 'https://**********.git/info/lfs'
The process '/usr/bin/git' failed with exit code 2
Waiting 13 seconds before trying again

I removed the first successfull lines of the log (successfully fetching) and the server url, because it is a private server.

The act runner is built today.

I did not test it on try.gitea.io, because actions is not enabled in this environment.

Thank you for your help and this great tool

Gitea Version

1.19.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

linux

How are you running Gitea?

Gitea runs in docker.

Database

SQLite

@silverwind silverwind added the topic/gitea-actions related to the actions of Gitea label Mar 30, 2023
@Zettat123 Zettat123 self-assigned this Mar 31, 2023
wolfogre pushed a commit that referenced this issue Apr 2, 2023
Close #23824 

Actions cannot fetch LFS objects from private repos because we don't
check if the user is the `ActionUser`.
GiteaBot pushed a commit to GiteaBot/gitea that referenced this issue Apr 2, 2023
Close go-gitea#23824 

Actions cannot fetch LFS objects from private repos because we don't
check if the user is the `ActionUser`.
zeripath pushed a commit that referenced this issue Apr 2, 2023
Backport #23841 by @Zettat123

Close #23824 

Actions cannot fetch LFS objects from private repos because we don't
check if the user is the `ActionUser`.

Co-authored-by: Zettat123 <zettat123@gmail.com>
@go-gitea go-gitea locked and limited conversation to collaborators May 3, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
topic/gitea-actions related to the actions of Gitea type/bug
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants