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

Error: Bad credentials - using v5 on self-hosted runner #221

Open
my1e5 opened this issue Jan 2, 2025 · 7 comments
Open

Error: Bad credentials - using v5 on self-hosted runner #221

my1e5 opened this issue Jan 2, 2025 · 7 comments
Labels
help wanted Extra attention is needed

Comments

@my1e5
Copy link

my1e5 commented Jan 2, 2025

This is a new issue for v5, but it is also a follow on from the issue I faced with v4 - see #192. Going from v3 to v4 was giving me a ::error::GetUserByName: "user redirect does not exist [name: astral-sh]" error, which is still unsolved.

Today I tried migrating from v3 to v5.

    steps:
    - name: Checkout repository
      uses: actions/checkout@v4
      with:
        fetch-depth: 0
    - name: Set up uv
      id: setup-uv
      uses: astral-sh/setup-uv@v5
      with:
        enable-cache: true
        prune-cache: false

But now I'm getting a ::error::Bad credentials - https://docs.github.com/rest error.

Image

As with issue #192, if I downgrade to v3 everything works.

Logs

2025-01-02T17:08:37.6742955Z 691786da41c7(version:v0.2.11) received task 981 of job 805, be triggered by event: pull_request
2025-01-02T17:08:37.6754557Z workflow prepared
2025-01-02T17:08:37.6756861Z evaluating expression 'success()'
2025-01-02T17:08:37.6758314Z expression 'success()' evaluated to 'true'
2025-01-02T17:08:37.6758941Z 🚀  Start image=catthehacker/ubuntu:act-latest
2025-01-02T17:08:37.7347246Z   🐳  docker pull image=catthehacker/ubuntu:act-latest platform= username= forcePull=true
2025-01-02T17:08:37.7347456Z   🐳  docker pull catthehacker/ubuntu:act-latest
2025-01-02T17:08:37.7347644Z pulling image 'docker.io/catthehacker/ubuntu:act-latest' ()
2025-01-02T17:08:38.9190538Z Pulling from catthehacker/ubuntu :: act-latest
2025-01-02T17:08:38.9380085Z Digest: sha256:89367f3c5437699c6b43fa941041725bcc77682a46f2bbe6557541e384d9cedb :: 
2025-01-02T17:08:38.9380364Z Status: Image is up to date for catthehacker/ubuntu:act-latest :: 
2025-01-02T17:08:38.9443012Z   🐳  docker create image=catthehacker/ubuntu:act-latest platform= entrypoint=["/bin/sleep" "10800"] cmd=[] network="bridge"
2025-01-02T17:08:39.0014370Z Custom container.Config from options ==> &{Hostname: Domainname: User: AttachStdin:false AttachStdout:true AttachStderr:true ExposedPorts:map[] Tty:false OpenStdin:false StdinOnce:false Env:[] Cmd:[] Healthcheck:<nil> ArgsEscaped:false Image: Volumes:map[] WorkingDir: Entrypoint:[] NetworkDisabled:false MacAddress: OnBuild:[] Labels:map[] StopSignal: StopTimeout:<nil> Shell:[]}
2025-01-02T17:08:39.0014693Z Merged container.Config ==> &{Hostname: Domainname: User: AttachStdin:false AttachStdout:true AttachStderr:true ExposedPorts:map[] Tty:false OpenStdin:false StdinOnce:false Env:[RUNNER_TOOL_CACHE=/opt/hostedtoolcache RUNNER_OS=Linux RUNNER_ARCH=X64 RUNNER_TEMP=/tmp LANG=C.UTF-8] Cmd:[] Healthcheck:<nil> ArgsEscaped:false Image:catthehacker/ubuntu:act-latest Volumes:map[] WorkingDir:/workspace/Research/Python Entrypoint:[/bin/sleep 10800] NetworkDisabled:false MacAddress: OnBuild:[] Labels:map[] StopSignal: StopTimeout:<nil> Shell:[]}
2025-01-02T17:08:39.0015103Z Custom container.HostConfig from options ==> &{Binds:[] ContainerIDFile: LogConfig:{Type: Config:map[]} NetworkMode:bridge PortBindings:map[] RestartPolicy:{Name:no MaximumRetryCount:0} AutoRemove:false VolumeDriver: VolumesFrom:[] ConsoleSize:[0 0] Annotations:map[] CapAdd:[] CapDrop:[] CgroupnsMode: DNS:[] DNSOptions:[] DNSSearch:[] ExtraHosts:[] GroupAdd:[] IpcMode: Cgroup: Links:[] OomScoreAdj:0 PidMode: Privileged:false PublishAllPorts:false ReadonlyRootfs:false SecurityOpt:[] StorageOpt:map[] Tmpfs:map[] UTSMode: UsernsMode: ShmSize:0 Sysctls:map[] Runtime: Isolation: Resources:{CPUShares:0 Memory:0 NanoCPUs:0 CgroupParent: BlkioWeight:0 BlkioWeightDevice:[] BlkioDeviceReadBps:[] BlkioDeviceWriteBps:[] BlkioDeviceReadIOps:[] BlkioDeviceWriteIOps:[] CPUPeriod:0 CPUQuota:0 CPURealtimePeriod:0 CPURealtimeRuntime:0 CpusetCpus: CpusetMems: Devices:[] DeviceCgroupRules:[] DeviceRequests:[] KernelMemory:0 KernelMemoryTCP:0 MemoryReservation:0 MemorySwap:0 MemorySwappiness:0xc0000dc948 OomKillDisable:0xc0000dc843 PidsLimit:0xc0000dc9a8 Ulimits:[] CPUCount:0 CPUPercent:0 IOMaximumIOps:0 IOMaximumBandwidth:0} Mounts:[] MaskedPaths:[] ReadonlyPaths:[] Init:<nil>}
2025-01-02T17:08:39.0015525Z --network and --net in the options will be ignored.
2025-01-02T17:08:39.0015772Z Merged container.HostConfig ==> &{Binds:[/var/run/docker.sock:/var/run/docker.sock /mkdocs:/mkdocs] ContainerIDFile: LogConfig:{Type: Config:map[]} NetworkMode:bridge PortBindings:map[] RestartPolicy:{Name:no MaximumRetryCount:0} AutoRemove:true VolumeDriver: VolumesFrom:[] ConsoleSize:[0 0] Annotations:map[] CapAdd:[] CapDrop:[] CgroupnsMode: DNS:[] DNSOptions:[] DNSSearch:[] ExtraHosts:[] GroupAdd:[] IpcMode: Cgroup: Links:[] OomScoreAdj:0 PidMode: Privileged:false PublishAllPorts:false ReadonlyRootfs:false SecurityOpt:[] StorageOpt:map[] Tmpfs:map[] UTSMode: UsernsMode: ShmSize:0 Sysctls:map[] Runtime: Isolation: Resources:{CPUShares:0 Memory:0 NanoCPUs:0 CgroupParent: BlkioWeight:0 BlkioWeightDevice:[] BlkioDeviceReadBps:[] BlkioDeviceWriteBps:[] BlkioDeviceReadIOps:[] BlkioDeviceWriteIOps:[] CPUPeriod:0 CPUQuota:0 CPURealtimePeriod:0 CPURealtimeRuntime:0 CpusetCpus: CpusetMems: Devices:[] DeviceCgroupRules:[] DeviceRequests:[] KernelMemory:0 KernelMemoryTCP:0 MemoryReservation:0 MemorySwap:0 MemorySwappiness:0xc0000dc948 OomKillDisable:0xc0000dc843 PidsLimit:0xc0000dc9a8 Ulimits:[] CPUCount:0 CPUPercent:0 IOMaximumIOps:0 IOMaximumBandwidth:0} Mounts:[{Type:volume Source:act-toolcache Target:/opt/hostedtoolcache ReadOnly:false Consistency: BindOptions:<nil> VolumeOptions:<nil> TmpfsOptions:<nil> ClusterOptions:<nil>} {Type:volume Source:GITEA-ACTIONS-TASK-981_WORKFLOW-ci_JOB-ci-env Target:/var/run/act ReadOnly:false Consistency: BindOptions:<nil> VolumeOptions:<nil> TmpfsOptions:<nil> ClusterOptions:<nil>} {Type:volume Source:GITEA-ACTIONS-TASK-981_WORKFLOW-ci_JOB-ci Target:/workspace/Research/Python ReadOnly:false Consistency: BindOptions:<nil> VolumeOptions:<nil> TmpfsOptions:<nil> ClusterOptions:<nil>}] MaskedPaths:[] ReadonlyPaths:[] Init:<nil>}
2025-01-02T17:08:39.0641380Z Created container name=GITEA-ACTIONS-TASK-981_WORKFLOW-ci_JOB-ci id=8b38a28a608290a17bda72738dcb28a95c26053386e573c943f06e8bd83f0bea from image catthehacker/ubuntu:act-latest (platform: )
2025-01-02T17:08:39.0641748Z ENV ==> [RUNNER_TOOL_CACHE=/opt/hostedtoolcache RUNNER_OS=Linux RUNNER_ARCH=X64 RUNNER_TEMP=/tmp LANG=C.UTF-8]
2025-01-02T17:08:39.0641949Z   🐳  docker run image=catthehacker/ubuntu:act-latest platform= entrypoint=["/bin/sleep" "10800"] cmd=[] network="bridge"
2025-01-02T17:08:39.0642173Z Starting container: 8b38a28a608290a17bda72738dcb28a95c26053386e573c943f06e8bd83f0bea
2025-01-02T17:08:39.8494154Z Started container: 8b38a28a608290a17bda72738dcb28a95c26053386e573c943f06e8bd83f0bea
2025-01-02T17:08:40.1287419Z Writing entry to tarball workflow/event.json len:8019
2025-01-02T17:08:40.1287926Z Writing entry to tarball workflow/envs.txt len:0
2025-01-02T17:08:40.1288061Z Extracting content to '/var/run/act/'
2025-01-02T17:08:40.2441914Z   ☁  git clone 'https://github.com/actions/checkout' # ref=v4
2025-01-02T17:08:40.2442177Z   cloning https://github.com/actions/checkout to /data/cache/actions/c3fe249fe73091a17d6638fe1341e7bd0bcc3466ce52323c0688e83e2463a4ab
2025-01-02T17:08:40.5914714Z Unable to pull refs/heads/v4: worktree contains unstaged changes
2025-01-02T17:08:40.5915113Z Cloned https://github.com/actions/checkout to /data/cache/actions/c3fe249fe73091a17d6638fe1341e7bd0bcc3466ce52323c0688e83e2463a4ab
2025-01-02T17:08:40.6160382Z Checked out v4
2025-01-02T17:08:40.6770410Z   ☁  git clone 'https://github.com/astral-sh/setup-uv' # ref=v5
2025-01-02T17:08:40.6770728Z   cloning https://github.com/astral-sh/setup-uv to /data/cache/actions/32fcf3402d7d8d1bddffdecfcefd11460803b724b970b48a10d57aeede52e932
2025-01-02T17:08:47.0738274Z Cloned https://github.com/astral-sh/setup-uv to /data/cache/actions/32fcf3402d7d8d1bddffdecfcefd11460803b724b970b48a10d57aeede52e932
2025-01-02T17:08:47.2176482Z Checked out v5
2025-01-02T17:08:47.3829777Z evaluating expression ''
2025-01-02T17:08:47.3830185Z expression '' evaluated to 'true'
2025-01-02T17:08:47.3830284Z ⭐ Run Main Checkout repository
2025-01-02T17:08:47.3830509Z Writing entry to tarball workflow/outputcmd.txt len:0
2025-01-02T17:08:47.3830653Z Writing entry to tarball workflow/statecmd.txt len:0
2025-01-02T17:08:47.3830753Z Writing entry to tarball workflow/pathcmd.txt len:0
2025-01-02T17:08:47.3830845Z Writing entry to tarball workflow/envs.txt len:0
2025-01-02T17:08:47.3830901Z Writing entry to tarball workflow/SUMMARY.md len:0
2025-01-02T17:08:47.3830967Z Extracting content to '/var/run/act'
2025-01-02T17:08:47.4390003Z expression '${{ github.token }}' rewritten to 'format('{0}', github.token)'
2025-01-02T17:08:47.4390232Z evaluating expression 'format('{0}', github.token)'
2025-01-02T17:08:47.4390482Z expression 'format('{0}', github.token)' evaluated to '%!t(string=***)'
2025-01-02T17:08:47.4390719Z expression '${{ github.repository }}' rewritten to 'format('{0}', github.repository)'
2025-01-02T17:08:47.4390800Z evaluating expression 'format('{0}', github.repository)'
2025-01-02T17:08:47.4390915Z expression 'format('{0}', github.repository)' evaluated to '%!t(string=Research/Python)'
2025-01-02T17:08:47.4391219Z type=remote-action actionDir=/data/cache/actions/c3fe249fe73091a17d6638fe1341e7bd0bcc3466ce52323c0688e83e2463a4ab actionPath= workdir=/workspace/Research/Python actionCacheDir=/data/cache/actions actionName=c3fe249fe73091a17d6638fe1341e7bd0bcc3466ce52323c0688e83e2463a4ab containerActionDir=/var/run/act/actions/c3fe249fe73091a17d6638fe1341e7bd0bcc3466ce52323c0688e83e2463a4ab
2025-01-02T17:08:47.4391362Z /var/run/act/actions/c3fe249fe73091a17d6638fe1341e7bd0bcc3466ce52323c0688e83e2463a4ab
2025-01-02T17:08:47.4391472Z Removing /data/cache/actions/c3fe249fe73091a17d6638fe1341e7bd0bcc3466ce52323c0688e83e2463a4ab/.gitignore before docker cp
2025-01-02T17:08:47.4391825Z   🐳  docker cp src=/data/cache/actions/c3fe249fe73091a17d6638fe1341e7bd0bcc3466ce52323c0688e83e2463a4ab/ dst=/var/run/act/actions/c3fe249fe73091a17d6638fe1341e7bd0bcc3466ce52323c0688e83e2463a4ab/
2025-01-02T17:08:47.4392008Z Writing tarball /tmp/act1680018240 from /data/cache/actions/c3fe249fe73091a17d6638fe1341e7bd0bcc3466ce52323c0688e83e2463a4ab/
2025-01-02T17:08:47.4392095Z Stripping prefix:/data/cache/actions/c3fe249fe73091a17d6638fe1341e7bd0bcc3466ce52323c0688e83e2463a4ab/ src:/data/cache/actions/c3fe249fe73091a17d6638fe1341e7bd0bcc3466ce52323c0688e83e2463a4ab/
2025-01-02T17:08:47.4597479Z Extracting content from '/tmp/act1680018240' to '/var/run/act/actions/c3fe249fe73091a17d6638fe1341e7bd0bcc3466ce52323c0688e83e2463a4ab/'
2025-01-02T17:08:47.5373720Z executing remote job container: [node /var/run/act/actions/c3fe249fe73091a17d6638fe1341e7bd0bcc3466ce52323c0688e83e2463a4ab/dist/index.js]
2025-01-02T17:08:47.5374006Z   🐳  docker exec cmd=[node /var/run/act/actions/c3fe249fe73091a17d6638fe1341e7bd0bcc3466ce52323c0688e83e2463a4ab/dist/index.js] user= workdir=
2025-01-02T17:08:47.5374095Z Exec command '[node /var/run/act/actions/c3fe249fe73091a17d6638fe1341e7bd0bcc3466ce52323c0688e83e2463a4ab/dist/index.js]'
2025-01-02T17:08:47.5374356Z Working directory '/workspace/Research/Python'
2025-01-02T17:08:47.7519687Z ::add-matcher::/run/act/actions/c3fe249fe73091a17d6638fe1341e7bd0bcc3466ce52323c0688e83e2463a4ab/dist/problem-matcher.json
2025-01-02T17:08:47.7519941Z ::add-matcher::/run/act/actions/c3fe249fe73091a17d6638fe1341e7bd0bcc3466ce52323c0688e83e2463a4ab/dist/problem-matcher.json
2025-01-02T17:08:47.7524532Z Syncing repository: Research/Python
2025-01-02T17:08:47.7534860Z ::group::Getting Git version info
2025-01-02T17:08:47.7535027Z Working directory is '/workspace/Research/Python'
2025-01-02T17:08:47.7561245Z [command]/usr/bin/git version
2025-01-02T17:08:47.7593474Z git version 2.47.1
2025-01-02T17:08:47.7615163Z ::endgroup::
2025-01-02T17:08:47.7630733Z Temporarily overriding HOME='/tmp/a0ff5ca6-7a1b-451a-9d05-f218c257dda3' before making global git config changes
2025-01-02T17:08:47.7630998Z Adding repository directory to the temporary git global config as a safe directory
2025-01-02T17:08:47.7635603Z [command]/usr/bin/git config --global --add safe.directory /workspace/Research/Python
2025-01-02T17:08:47.7659575Z Deleting the contents of '/workspace/Research/Python'
2025-01-02T17:08:47.7663303Z ::group::Initializing the repository
2025-01-02T17:08:47.7666781Z [command]/usr/bin/git init /workspace/Research/Python
2025-01-02T17:08:47.7691327Z hint: Using 'master' as the name for the initial branch. This default branch name
2025-01-02T17:08:47.7691685Z hint: is subject to change. To configure the initial branch name to use in all
2025-01-02T17:08:47.7691810Z hint: of your new repositories, which will suppress this warning, call:
2025-01-02T17:08:47.7691922Z hint:
2025-01-02T17:08:47.7692028Z hint: 	git config --global init.defaultBranch <name>
2025-01-02T17:08:47.7692143Z hint:
2025-01-02T17:08:47.7692227Z hint: Names commonly chosen instead of 'master' are 'main', 'trunk' and
2025-01-02T17:08:47.7692345Z hint: 'development'. The just-created branch can be renamed via this command:
2025-01-02T17:08:47.7692448Z hint:
2025-01-02T17:08:47.7692562Z hint: 	git branch -m <name>
2025-01-02T17:08:47.7692880Z Initialized empty Git repository in /workspace/Research/Python/.git/
2025-01-02T17:08:47.7700866Z [command]/usr/bin/git remote add origin http://mygiteaserver/Research/Python
2025-01-02T17:08:47.7721281Z ::endgroup::
2025-01-02T17:08:47.7721631Z ::group::Disabling automatic garbage collection
2025-01-02T17:08:47.7724711Z [command]/usr/bin/git config --local gc.auto 0
2025-01-02T17:08:47.7743269Z ::endgroup::
2025-01-02T17:08:47.7743488Z ::group::Setting up auth
2025-01-02T17:08:47.7748097Z [command]/usr/bin/git config --local --name-only --get-regexp core\.sshCommand
2025-01-02T17:08:47.7766292Z [command]/usr/bin/git submodule foreach --recursive sh -c "git config --local --name-only --get-regexp 'core\.sshCommand' && git config --local --unset-all 'core.sshCommand' || :"
2025-01-02T17:08:47.7901780Z [command]/usr/bin/git config --local --name-only --get-regexp http\.http\:\/\/mygiteaserver\/\.extraheader
2025-01-02T17:08:47.7921635Z [command]/usr/bin/git submodule foreach --recursive sh -c "git config --local --name-only --get-regexp 'http\.http\:\/\/mygiteaserver\/\.extraheader' && git config --local --unset-all 'http.http://mygiteaserver/.extraheader' || :"
2025-01-02T17:08:47.8065406Z [command]/usr/bin/git config --local http.http://mygiteaserver/.extraheader AUTHORIZATION: basic ***
2025-01-02T17:08:47.8089535Z ::endgroup::
2025-01-02T17:08:47.8089838Z ::group::Fetching the repository
2025-01-02T17:08:47.8096638Z [command]/usr/bin/git -c protocol.version=2 fetch --prune --no-recurse-submodules origin +refs/heads/*:refs/remotes/origin/* +refs/tags/*:refs/tags/* +1c73128722bbb78908983052eedca67780be251e:refs/remotes/pull/263/head
2025-01-02T17:08:48.5047226Z From http://mygiteaserver/Research/Python
2025-01-02T17:08:48.5047745Z  * [new branch]      main                                     -> origin/main
2025-01-02T17:08:48.5048125Z  * [new tag]         v0.2.0                                   -> v0.2.0
2025-01-02T17:08:48.5048451Z  * [new tag]         v0.3.0                                   -> v0.3.0
2025-01-02T17:08:48.5048564Z  * [new tag]         v0.3.1                                   -> v0.3.1
2025-01-02T17:08:48.5048650Z  * [new tag]         v0.3.2                                   -> v0.3.2
2025-01-02T17:08:48.5048766Z  * [new tag]         v0.3.3                                   -> v0.3.3
2025-01-02T17:08:48.5050376Z  * [new tag]         v0.3.4                                   -> v0.3.4
2025-01-02T17:08:48.5050685Z  * [new tag]         v0.4.0                                   -> v0.4.0
2025-01-02T17:08:48.5050982Z  * [new tag]         v0.4.1                                   -> v0.4.1
2025-01-02T17:08:48.5052195Z  * [new tag]         v0.4.2                                   -> v0.4.2
2025-01-02T17:08:48.5052459Z  * [new tag]         v0.4.3                                   -> v0.4.3
2025-01-02T17:08:48.5053913Z  * [new tag]         v0.4.4                                   -> v0.4.4
2025-01-02T17:08:48.5054189Z  * [new tag]         v0.4.5                                   -> v0.4.5
2025-01-02T17:08:48.5054289Z  * [new tag]         v0.4.6                                   -> v0.4.6
2025-01-02T17:08:48.5065405Z  * [new tag]         v0.5.0                                   -> v0.5.0
2025-01-02T17:08:48.5065656Z  * [new tag]         v0.5.1                                   -> v0.5.1
2025-01-02T17:08:48.5065818Z  * [new tag]         v0.5.2                                   -> v0.5.2
2025-01-02T17:08:48.5065948Z  * [new ref]         1c73128722bbb78908983052eedca67780be251e -> pull/263/head
2025-01-02T17:08:48.5084967Z ::endgroup::
2025-01-02T17:08:48.5085289Z ::group::Determining the checkout info
2025-01-02T17:08:48.5085677Z ::endgroup::
2025-01-02T17:08:48.5089831Z [command]/usr/bin/git sparse-checkout disable
2025-01-02T17:08:48.5119447Z [command]/usr/bin/git config --local --unset-all extensions.worktreeConfig
2025-01-02T17:08:48.5135706Z ::group::Checking out the ref
2025-01-02T17:08:48.5138606Z [command]/usr/bin/git checkout --progress --force refs/remotes/pull/263/head
2025-01-02T17:08:48.5246289Z Note: switching to 'refs/remotes/pull/263/head'.
2025-01-02T17:08:48.5246542Z 
2025-01-02T17:08:48.5246690Z You are in 'detached HEAD' state. You can look around, make experimental
2025-01-02T17:08:48.5246793Z changes and commit them, and you can discard any commits you make in this
2025-01-02T17:08:48.5246886Z state without impacting any branches by switching back to a branch.
2025-01-02T17:08:48.5246964Z 
2025-01-02T17:08:48.5247030Z If you want to create a new branch to retain commits you create, you may
2025-01-02T17:08:48.5247119Z do so (now or later) by using -c with the switch command. Example:
2025-01-02T17:08:48.5247191Z 
2025-01-02T17:08:48.5247256Z   git switch -c <new-branch-name>
2025-01-02T17:08:48.5247322Z 
2025-01-02T17:08:48.5247388Z Or undo this operation with:
2025-01-02T17:08:48.5247456Z 
2025-01-02T17:08:48.5247520Z   git switch -
2025-01-02T17:08:48.5247582Z 
2025-01-02T17:08:48.5247645Z Turn off this advice by setting config variable advice.detachedHead to false
2025-01-02T17:08:48.5247733Z 
2025-01-02T17:08:48.5247794Z HEAD is now at 1c73128 Update .gitea/workflows/main.yaml
2025-01-02T17:08:48.5249978Z ::endgroup::
2025-01-02T17:08:48.5273119Z [command]/usr/bin/git log -1 --format=%H
2025-01-02T17:08:48.5287528Z 1c73128722bbb78908983052eedca67780be251e
2025-01-02T17:08:49.3026560Z ::error::Bad credentials - https://docs.github.com/rest
2025-01-02T17:08:48.5298619Z ::remove-matcher owner=checkout-git::
2025-01-02T17:08:50.7323818Z evaluating expression 'success()'
2025-01-02T17:08:50.7328812Z expression 'success()' evaluated to 'false'
2025-01-02T17:08:50.7329199Z Skipping step 'Set up uv' due to 'success()'
2025-01-02T17:08:50.8985698Z evaluating expression 'always()'
2025-01-02T17:08:50.8986295Z expression 'always()' evaluated to 'true'
2025-01-02T17:08:50.8986500Z ⭐ Run Post Checkout repository
2025-01-02T17:08:50.8986719Z Writing entry to tarball workflow/outputcmd.txt len:0
2025-01-02T17:08:50.8986905Z Writing entry to tarball workflow/statecmd.txt len:0
2025-01-02T17:08:50.8987065Z Writing entry to tarball workflow/pathcmd.txt len:0
2025-01-02T17:08:50.8987142Z Writing entry to tarball workflow/envs.txt len:0
2025-01-02T17:08:50.8987202Z Writing entry to tarball workflow/SUMMARY.md len:0
2025-01-02T17:08:50.8987406Z Extracting content to '/var/run/act'
2025-01-02T17:08:50.9009818Z run post step for 'Checkout repository'
2025-01-02T17:08:50.9010389Z executing remote job container: [node /var/run/act/actions/c3fe249fe73091a17d6638fe1341e7bd0bcc3466ce52323c0688e83e2463a4ab/dist/index.js]
2025-01-02T17:08:50.9010532Z   🐳  docker exec cmd=[node /var/run/act/actions/c3fe249fe73091a17d6638fe1341e7bd0bcc3466ce52323c0688e83e2463a4ab/dist/index.js] user= workdir=
2025-01-02T17:08:50.9010641Z Exec command '[node /var/run/act/actions/c3fe249fe73091a17d6638fe1341e7bd0bcc3466ce52323c0688e83e2463a4ab/dist/index.js]'
2025-01-02T17:08:50.9010920Z Working directory '/workspace/Research/Python'
2025-01-02T17:08:51.1495855Z [command]/usr/bin/git version
2025-01-02T17:08:51.1522994Z git version 2.47.1
2025-01-02T17:08:51.1543212Z ***
2025-01-02T17:08:51.1557900Z Temporarily overriding HOME='/tmp/e461e1ee-aaf3-4863-ba78-e065bbfd1b88' before making global git config changes
2025-01-02T17:08:51.1559685Z Adding repository directory to the temporary git global config as a safe directory
2025-01-02T17:08:51.1564368Z [command]/usr/bin/git config --global --add safe.directory /workspace/Research/Python
2025-01-02T17:08:51.1590955Z [command]/usr/bin/git config --local --name-only --get-regexp core\.sshCommand
2025-01-02T17:08:51.1612714Z [command]/usr/bin/git submodule foreach --recursive sh -c "git config --local --name-only --get-regexp 'core\.sshCommand' && git config --local --unset-all 'core.sshCommand' || :"
2025-01-02T17:08:51.1751189Z [command]/usr/bin/git config --local --name-only --get-regexp http\.http\:\/\/mygiteaserver\/\.extraheader
2025-01-02T17:08:51.1763483Z http.http://mygiteaserver/.extraheader
2025-01-02T17:08:51.1770612Z [command]/usr/bin/git config --local --unset-all http.http://mygiteaserver/.extraheader
2025-01-02T17:08:51.1789159Z [command]/usr/bin/git submodule foreach --recursive sh -c "git config --local --name-only --get-regexp 'http\.http\:\/\/mygiteaserver\/\.extraheader' && git config --local --unset-all 'http.http://mygiteaserver/.extraheader' || :"
2025-01-02T17:08:51.1980019Z   ✅  Success - Post Checkout repository
2025-01-02T17:08:51.2039437Z Cleaning up container for job ci
2025-01-02T17:08:52.0337487Z Removed container: 8b38a28a608290a17bda72738dcb28a95c26053386e573c943f06e8bd83f0bea
2025-01-02T17:08:52.0345953Z   🐳  docker volume rm GITEA-ACTIONS-TASK-981_WORKFLOW-ci_JOB-ci
2025-01-02T17:08:52.0427561Z   🐳  docker volume rm GITEA-ACTIONS-TASK-981_WORKFLOW-ci_JOB-ci-env
2025-01-02T17:08:52.0753375Z 🏁  Job failed
2025-01-02T17:08:52.1295129Z Job 'ci' failed
@adr1enbe4udou1n
Copy link

When self-hosted, it seems like "github-token" must be setted.
Idk why it's needed since v5 but it works fine with explicit token with at least repo public read access :

- uses: astral-sh/setup-uv@v5
  with:
    enable-cache: true
    prune-cache: false
    github-token: ${{ secrets.MY_GITHUB_TOKEN }}

@my1e5
Copy link
Author

my1e5 commented Jan 3, 2025

Hmm interesting I wonder why v5 now requires this? Was it this PR?

For reference, I'm using setup-uv completely outside of GitHub. At my company, we run a local Gitea server which uses Gitea actions. Having to set up a dedicated GitHub account to get a secret GitHub token and add this to all our repos would be a little inconvenient. Is there another way?

@adr1enbe4udou1n
Copy link

I'm using Gitea too, you're not forced to put token secret in every repo, you can scope the secret for each organization account of your gitea instance, so the token will be automatically available into all repo of related organization.

@my1e5
Copy link
Author

my1e5 commented Jan 7, 2025

@adr1enbe4udou1n Thanks for that tip.

I still hope there can be a way to use setup-uv on self-hosted runners without requiring a GitHub token. As mentioned, this is an added complication for those of us using this action outside of the GitHub ecosystem, such as with Gitea actions. The need to create a GitHub account to generate the token — and then manage this token and account, especially in a corporate environment — adds a layer of complexity. If there's any way to avoid this requirement, I’d be very grateful if it could be explored.

As a point of comparison that I hope is relevant, the uv self update command also utilises GitHub release artifacts, yet it doesn’t require a GitHub token—it’s optional.

$ uv self update --help
Update uv

Usage: uv.exe self update [OPTIONS] [TARGET_VERSION]

Arguments:
  [TARGET_VERSION]  Update to the specified version. If not provided, uv will update to the latest version

Options:
      --token <TOKEN>  A GitHub token for authentication. A token is not required but can be used to reduce the chance of encountering rate limits [env: UV_GITHUB_TOKEN=]

@eifinger
Copy link
Collaborator

eifinger commented Jan 7, 2025

Thank you for creating the detailed issues you have with Gitea. I currently do not see why v3 works but v4 doesn't. There might however be a workaround I could implement to work with an empty Github token.

Please be aware that I only a limited amount of time I can work on this. I am happy to review PRs!

@eifinger
Copy link
Collaborator

eifinger commented Jan 8, 2025

This action currently assumes that it is running in the GitHub ecosystem which makes sure that the env var GITHUB_TOKEN is always set and can be used to connect to the Github REST API.

If you are using e.g. Gitea please make sure that you provide a valid token.

To solve that we need to exchange octokit with other means to collect release information which does not need a token.

@kquinsland
Copy link

I am also hitting this with self-hosted GHE.

To solve that we need to exchange octokit with other means to collect release information which does not need a token.

While not the most straight forward, I could see a basic "if you don't provide a valid token, you must explicitly set the version you want to dl" policy.

This might be too much of a hack, but I use this trick in bash scripts from time to time:

❯ wget -q -O - https://api.github.com/repos/astral-sh/uv/releases/latest  |  jq -r '.assets[] | .browser_download_url'
https://github.com/astral-sh/uv/releases/download/0.5.20/dist-manifest.json
https://github.com/astral-sh/uv/releases/download/0.5.20/sha256.sum
https://github.com/astral-sh/uv/releases/download/0.5.20/source.tar.gz
https://github.com/astral-sh/uv/releases/download/0.5.20/source.tar.gz.sha256
https://github.com/astral-sh/uv/releases/download/0.5.20/uv-aarch64-apple-darwin.tar.gz
https://github.com/astral-sh/uv/releases/download/0.5.20/uv-aarch64-apple-darwin.tar.gz.sha256
https://github.com/astral-sh/uv/releases/download/0.5.20/uv-aarch64-unknown-linux-gnu.tar.gz
https://github.com/astral-sh/uv/releases/download/0.5.20/uv-aarch64-unknown-linux-gnu.tar.gz.sha256
https://github.com/astral-sh/uv/releases/download/0.5.20/uv-aarch64-unknown-linux-musl.tar.gz
https://github.com/astral-sh/uv/releases/download/0.5.20/uv-aarch64-unknown-linux-musl.tar.gz.sha256
https://github.com/astral-sh/uv/releases/download/0.5.20/uv-arm-unknown-linux-musleabihf.tar.gz
https://github.com/astral-sh/uv/releases/download/0.5.20/uv-arm-unknown-linux-musleabihf.tar.gz.sha256
https://github.com/astral-sh/uv/releases/download/0.5.20/uv-armv7-unknown-linux-gnueabihf.tar.gz
https://github.com/astral-sh/uv/releases/download/0.5.20/uv-armv7-unknown-linux-gnueabihf.tar.gz.sha256
https://github.com/astral-sh/uv/releases/download/0.5.20/uv-armv7-unknown-linux-musleabihf.tar.gz
https://github.com/astral-sh/uv/releases/download/0.5.20/uv-armv7-unknown-linux-musleabihf.tar.gz.sha256
https://github.com/astral-sh/uv/releases/download/0.5.20/uv-i686-pc-windows-msvc.zip
https://github.com/astral-sh/uv/releases/download/0.5.20/uv-i686-pc-windows-msvc.zip.sha256
https://github.com/astral-sh/uv/releases/download/0.5.20/uv-i686-unknown-linux-gnu.tar.gz
https://github.com/astral-sh/uv/releases/download/0.5.20/uv-i686-unknown-linux-gnu.tar.gz.sha256
https://github.com/astral-sh/uv/releases/download/0.5.20/uv-i686-unknown-linux-musl.tar.gz
https://github.com/astral-sh/uv/releases/download/0.5.20/uv-i686-unknown-linux-musl.tar.gz.sha256
https://github.com/astral-sh/uv/releases/download/0.5.20/uv-installer.ps1
https://github.com/astral-sh/uv/releases/download/0.5.20/uv-installer.sh
https://github.com/astral-sh/uv/releases/download/0.5.20/uv-powerpc64-unknown-linux-gnu.tar.gz
https://github.com/astral-sh/uv/releases/download/0.5.20/uv-powerpc64-unknown-linux-gnu.tar.gz.sha256
https://github.com/astral-sh/uv/releases/download/0.5.20/uv-powerpc64le-unknown-linux-gnu.tar.gz
https://github.com/astral-sh/uv/releases/download/0.5.20/uv-powerpc64le-unknown-linux-gnu.tar.gz.sha256
https://github.com/astral-sh/uv/releases/download/0.5.20/uv-s390x-unknown-linux-gnu.tar.gz
https://github.com/astral-sh/uv/releases/download/0.5.20/uv-s390x-unknown-linux-gnu.tar.gz.sha256
https://github.com/astral-sh/uv/releases/download/0.5.20/uv-x86_64-apple-darwin.tar.gz
https://github.com/astral-sh/uv/releases/download/0.5.20/uv-x86_64-apple-darwin.tar.gz.sha256
https://github.com/astral-sh/uv/releases/download/0.5.20/uv-x86_64-pc-windows-msvc.zip
https://github.com/astral-sh/uv/releases/download/0.5.20/uv-x86_64-pc-windows-msvc.zip.sha256
https://github.com/astral-sh/uv/releases/download/0.5.20/uv-x86_64-unknown-linux-gnu.tar.gz
https://github.com/astral-sh/uv/releases/download/0.5.20/uv-x86_64-unknown-linux-gnu.tar.gz.sha256
https://github.com/astral-sh/uv/releases/download/0.5.20/uv-x86_64-unknown-linux-musl.tar.gz
https://github.com/astral-sh/uv/releases/download/0.5.20/uv-x86_64-unknown-linux-musl.tar.gz.sha256

Add one more jq filter (or sed or awk or whatever you're most comfortable with) to pull out the binaries for $currentPlatform and then pipe that extracted url to one more wget call.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

4 participants