[GH-ISSUE #1301] Clone public repos if gh-token invalid or add a console log / readme update. #706

Open
opened 2026-03-01 21:45:42 +03:00 by kerem · 2 comments
Owner

Originally created by @adamkrawczyk on GitHub (Aug 11, 2022).
Original GitHub issue: https://github.com/nektos/act/issues/1301

Act version

act version 0.2.30

Feature description

I have tried this for the first time and pasted GH token inside [ ] braces, which caused fails in clone public repos.

$ sudo ./bin/act -s GITHUB_TOKEN=[ghp_something] 
[BuildTest/build] 🚀  Start image=catthehacker/ubuntu:act-20.04
[BuildTest/build]   🐳  docker pull image=catthehacker/ubuntu:act-20.04 platform= username= forcePull=false
[BuildTest/build]   🐳  docker create image=catthehacker/ubuntu:act-20.04 platform= entrypoint=["/usr/bin/tail" "-f" "/dev/null"] cmd=[]
[BuildTest/build]   🐳  docker run image=catthehacker/ubuntu:act-20.04 platform= entrypoint=["/usr/bin/tail" "-f" "/dev/null"] cmd=[]
[BuildTest/build]   ☁  git clone 'https://github.com/ros-tooling/setup-ros' # ref=v0.2
[BuildTest/build] Unable to clone https://github.com/ros-tooling/setup-ros refs/heads/v0.2: authentication required
[BuildTest/build] 🏁  Job succeeded
Error: authentication required

Even if the repo ros-tooling is public it is falling to clone. I think this is not the desired behavior.

Originally created by @adamkrawczyk on GitHub (Aug 11, 2022). Original GitHub issue: https://github.com/nektos/act/issues/1301 ### Act version act version 0.2.30 ### Feature description I have tried this for the first time and pasted GH token inside `[ ]` braces, which caused fails in clone public repos. ``` $ sudo ./bin/act -s GITHUB_TOKEN=[ghp_something] [BuildTest/build] 🚀 Start image=catthehacker/ubuntu:act-20.04 [BuildTest/build] 🐳 docker pull image=catthehacker/ubuntu:act-20.04 platform= username= forcePull=false [BuildTest/build] 🐳 docker create image=catthehacker/ubuntu:act-20.04 platform= entrypoint=["/usr/bin/tail" "-f" "/dev/null"] cmd=[] [BuildTest/build] 🐳 docker run image=catthehacker/ubuntu:act-20.04 platform= entrypoint=["/usr/bin/tail" "-f" "/dev/null"] cmd=[] [BuildTest/build] ☁ git clone 'https://github.com/ros-tooling/setup-ros' # ref=v0.2 [BuildTest/build] Unable to clone https://github.com/ros-tooling/setup-ros refs/heads/v0.2: authentication required [BuildTest/build] 🏁 Job succeeded Error: authentication required ``` Even if the repo ros-tooling is public it is falling to clone. I think this is not the desired behavior.
Author
Owner

@Shogobg commented on GitHub (Dec 7, 2023):

This might be related to https://github.com/nektos/act/issues/1161 - when using an enterprise Github, mark actions to be downloaded from github.com

<!-- gh-comment-id:1844782244 --> @Shogobg commented on GitHub (Dec 7, 2023): This might be related to https://github.com/nektos/act/issues/1161 - when using an enterprise Github, mark actions to be downloaded from github.com
Author
Owner

@leblancmeneses commented on GitHub (Dec 26, 2024):

act version 0.2.70 clone a public repository is working but GITHUB_TOKEN needs to be supplied.

act pull_request -s GITHUB_TOKEN="$(gh auth token)" -W .husky-ext-act/act.yml -j calculate -e .husky-ext-act/act.payload.json --action-offline-mode --artifact-server-path .husky-ext-act/.artifacts

sample from:
https://github.com/leblancmeneses/actions/blob/main/.husky/pre-commit#L32

<!-- gh-comment-id:2562130824 --> @leblancmeneses commented on GitHub (Dec 26, 2024): act version 0.2.70 clone a public repository is working but GITHUB_TOKEN needs to be supplied. `act pull_request -s GITHUB_TOKEN="$(gh auth token)" -W .husky-ext-act/act.yml -j calculate -e .husky-ext-act/act.payload.json --action-offline-mode --artifact-server-path .husky-ext-act/.artifacts` sample from: https://github.com/leblancmeneses/actions/blob/main/.husky/pre-commit#L32
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/act#706
No description provided.