Skip to content

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

Closed
@apairon

Description

@apairon

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

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions