[GH-ISSUE #881] Issue: More clearly indicate that failures can result because GITHUB_TOKEN is not passed in as a secret #526

Closed
opened 2026-03-01 21:44:11 +03:00 by kerem · 8 comments
Owner

Originally created by @hexmode on GitHub (Nov 14, 2021).
Original GitHub issue: https://github.com/nektos/act/issues/881

System information

  • Operating System: linux centos 8 stream
  • Architecture: x64
  • Apple M1: no
  • Docker version: 20.10.10
  • Docker image used in act: nektos/act-environments-ubuntu:18.04
  • act version: 0.2.24

Expected behaviour

git task run
Run actions/checkout@v2
(node:2505) [DEP0005] DeprecationWarning: Buffer() is deprecated due to security and usability issues. Please use the Buffer.alloc(), Buffer.allocUnsafe(), or Buffer.from() methods instead.
Syncing repository: nektos/act
Getting Git version info
  Working directory is '/home/runner/work/test/test'
  /usr/bin/git version
  git version 2.33.1
Deleting the contents of '/home/runner/work/test/test'
Initializing the repository
  /usr/bin/git init /home/runner/work/test/test
  hint: Using 'master' as the name for the initial branch. This default branch name
  hint: is subject to change. To configure the initial branch name to use in all
  hint: of your new repositories, which will suppress this warning, call:
  hint: 
  hint: 	git config --global init.defaultBranch <name>
  hint: 
  hint: Names commonly chosen instead of 'master' are 'main', 'trunk' and
  hint: 'development'. The just-created branch can be renamed via this command:
  hint: 
  hint: 	git branch -m <name>
  Initialized empty Git repository in /home/runner/work/test/test/.git/
  /usr/bin/git remote add origin https://github.com/nektos/act
Disabling automatic garbage collection
  /usr/bin/git config --local gc.auto 0
Setting up auth
  /usr/bin/git config --local --name-only --get-regexp core\.sshCommand
  /usr/bin/git submodule foreach --recursive git config --local --name-only --get-regexp 'core\.sshCommand' && git config --local --unset-all 'core.sshCommand' || :
  /usr/bin/git config --local --name-only --get-regexp http\.https\:\/\/github\.com\/\.extraheader
  /usr/bin/git submodule foreach --recursive git config --local --name-only --get-regexp 'http\.https\:\/\/github\.com\/\.extraheader' && git config --local --unset-all 'http.https://github.com/.extraheader' || :
  /usr/bin/git config --local http.https://github.com/.extraheader AUTHORIZATION: basic ***
Determining the default branch
  Retrieving the default branch name
  Default branch 'master'
Fetching the repository
  /usr/bin/git -c protocol.version=2 fetch --no-tags --prune --progress --no-recurse-submodules --depth=1 origin +refs/heads/master:refs/remotes/origin/master
  remote: Enumerating objects: 236, done.        
  remote: Counting objects:   0% (1/236)        
  remote: Counting objects:   1% (3/236)        
...
  Resolving deltas: 100% (12/12)
  Resolving deltas: 100% (12/12), done.
  From https://github.com/nektos/act
   * [new branch]      master     -> origin/master
Determining the checkout info
Checking out the ref
  /usr/bin/git checkout --progress --force -B master refs/remotes/origin/master
  Reset branch 'master'
  Branch 'master' set up to track remote branch 'master' from 'origin'.
/usr/bin/git log -1 --format='%H'
'12fa4d703da8d05930303acbe6bbc8fd00c77de7'
0s
Post job cleanup.
/usr/bin/git version
git version 2.33.1
/usr/bin/git config --local --name-only --get-regexp core\.sshCommand
/usr/bin/git submodule foreach --recursive git config --local --name-only --get-regexp 'core\.sshCommand' && git config --local --unset-all 'core.sshCommand' || :
/usr/bin/git config --local --name-only --get-regexp http\.https\:\/\/github\.com\/\.extraheader
http.https://github.com/.extraheader
/usr/bin/git config --local --unset-all http.https://github.com/.extraheader
/usr/bin/git submodule foreach --recursive git config --local --name-only --get-regexp 'http\.https\:\/\/github\.com\/\.extraheader' && git config --local --unset-all 'http.https://github.com/.extraheader' || :

Actual behaviour

act run on same repo
DEBU[0000] Loading environment from /home/mah/test/.env 
DEBU[0000] Loading secrets from /home/mah/test/.secrets 
DEBU[0000] Loading workflows from '/home/mah/test/.github/workflows' 
DEBU[0000] Loading workflows recursively                
DEBU[0000] Found workflow 'tmp.yml' in '/home/mah/test/.github/workflows/tmp.yml' 
DEBU[0000] Reading workflow '/home/mah/test/.github/workflows/tmp.yml' 
DEBU[0000] Correcting if statements '/home/mah/test/.github/workflows/tmp.yml' 
DEBU[0000] Planning event: push                         
DEBU[0000] Loading slug from git directory '/home/mah/test/.git' 
DEBU[0000] Found revision: 32a1389ffaa6046b444a42562109a2cdd1c29ba2 
DEBU[0000] Loading revision from git directory '/home/mah/test/.git' 
DEBU[0000] Found revision: 32a1389ffaa6046b444a42562109a2cdd1c29ba2 
DEBU[0000] HEAD points to '32a1389ffaa6046b444a42562109a2cdd1c29ba2' 
DEBU[0000] using github ref: refs/heads/master          
DEBU[0000] context env => map[ACT:true]                 
DEBU[0000] context needs => map[]                       
[CI/run_tests] 🚀  Start image=nektos/act-environments-ubuntu:18.04
DEBU[0000] Loading slug from git directory '/home/mah/test/.git' 
DEBU[0000] Found revision: 32a1389ffaa6046b444a42562109a2cdd1c29ba2 
DEBU[0000] Loading revision from git directory '/home/mah/test/.git' 
DEBU[0000] Found revision: 32a1389ffaa6046b444a42562109a2cdd1c29ba2 
DEBU[0000] HEAD points to '32a1389ffaa6046b444a42562109a2cdd1c29ba2' 
DEBU[0000] using github ref: refs/heads/master          
[CI/run_tests]   🐳  docker pull nektos/act-environments-ubuntu:18.04
DEBU[0000] Image exists? true                           
[CI/run_tests] Removed container: 6bb0fdbacea9022abb8521c7174b8b291b05c38a4cd573315a8598d02e59c915
[CI/run_tests]   🐳  docker volume rm act-CI-run-tests
[CI/run_tests]   🐳  docker create image=nektos/act-environments-ubuntu:18.04 platform= entrypoint=["/usr/bin/tail" "-f" "/dev/null"] cmd=[]
[CI/run_tests] Created container name=act-CI-run-tests id=0ddb19d4a843f001e2f09857479c1bceb0e34cb3daa80ca9643a3de37376c9b2 from image nektos/act-environments-ubuntu:18.04 (platform: )
[CI/run_tests] ENV ==> [RUNNER_TOOL_CACHE=/opt/hostedtoolcache RUNNER_OS=Linux RUNNER_TEMP=/tmp]
[CI/run_tests]   🐳  docker run image=nektos/act-environments-ubuntu:18.04 platform= entrypoint=["/usr/bin/tail" "-f" "/dev/null"] cmd=[]
[CI/run_tests] Starting container: 0ddb19d4a843f001e2f09857479c1bceb0e34cb3daa80ca9643a3de37376c9b2
[CI/run_tests] Started container: 0ddb19d4a843f001e2f09857479c1bceb0e34cb3daa80ca9643a3de37376c9b2
[CI/run_tests]   🐳  docker exec cmd=[mkdir -m 0777 -p /var/run/act] user=root
[CI/run_tests] Exec command '[mkdir -m 0777 -p /var/run/act]'
DEBU[0000] Writing entry to tarball workflow/event.json len:2 
DEBU[0000] Writing entry to tarball workflow/envs.txt len:0 
DEBU[0000] Writing entry to tarball workflow/paths.txt len:0 
[CI/run_tests] Extracting content to '/var/run/act/'
DEBU[0000] Loading slug from git directory '/home/mah/test/.git' 
DEBU[0000] Found revision: 32a1389ffaa6046b444a42562109a2cdd1c29ba2 
DEBU[0000] Loading revision from git directory '/home/mah/test/.git' 
DEBU[0000] Found revision: 32a1389ffaa6046b444a42562109a2cdd1c29ba2 
DEBU[0000] HEAD points to '32a1389ffaa6046b444a42562109a2cdd1c29ba2' 
DEBU[0000] using github ref: refs/heads/master          
DEBU[0000] Loading slug from git directory '/home/mah/test/.git' 
DEBU[0000] Found revision: 32a1389ffaa6046b444a42562109a2cdd1c29ba2 
DEBU[0000] Loading revision from git directory '/home/mah/test/.git' 
DEBU[0000] Found revision: 32a1389ffaa6046b444a42562109a2cdd1c29ba2 
DEBU[0000] HEAD points to '32a1389ffaa6046b444a42562109a2cdd1c29ba2' 
DEBU[0000] using github ref: refs/heads/master          
DEBU[0000] context env => map[ACT:true AGENT_TOOLSDIRECTORY:/opt/hostedtoolcache ANT_HOME:/usr/share/ant CHROMEWEBDRIVER:/usr/local/share/chrome_driver CHROME_BIN:/usr/bin/google-chrome CONDA:/usr/share/miniconda DEBIAN_FRONTEND:noninteractive GECKOWEBDRIVER:/usr/local/share/gecko_driver GOROOT:/usr/local/go1.12 GOROOT_1_11_X64:/usr/local/go1.11 GOROOT_1_12_X64:/usr/local/go1.12 GOROOT_1_13_X64:/usr/local/go1.13 GRADLE_HOME:/usr/share/gradle ImageOS:ubuntu18 ImageVersion:dev JAVA_HOME:/usr/lib/jvm/zulu-8-azure-amd64 JAVA_HOME_11_X64:/usr/lib/jvm/zulu-11-azure-amd64 JAVA_HOME_12_X64:/usr/lib/jvm/zulu-12-azure-amd64 JAVA_HOME_7_X64:/usr/lib/jvm/zulu-7-azure-amd64 JAVA_HOME_8_X64:/usr/lib/jvm/zulu-8-azure-amd64 LEIN_HOME:/usr/local/lib/lein LEIN_JAR:/usr/local/lib/lein/self-installs/leiningen-2.9.1-standalone.jar M2_HOME:/usr/share/apache-maven-3.6.3 PATH:/usr/share/rust/.cargo/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/snap/bin SELENIUM_JAR_PATH:/usr/share/java/selenium-server-standalone.jar VCPKG_INSTALLATION_ROOT:/usr/local/share/vcpkg] 
DEBU[0000] context needs => map[]                       
DEBU[0000] Loading slug from git directory '/home/mah/test/.git' 
DEBU[0000] Found revision: 32a1389ffaa6046b444a42562109a2cdd1c29ba2 
DEBU[0000] Loading revision from git directory '/home/mah/test/.git' 
DEBU[0000] Found revision: 32a1389ffaa6046b444a42562109a2cdd1c29ba2 
DEBU[0000] HEAD points to '32a1389ffaa6046b444a42562109a2cdd1c29ba2' 
DEBU[0000] using github ref: refs/heads/master          
DEBU[0000] context env => map[ACT:true AGENT_TOOLSDIRECTORY:/opt/hostedtoolcache ANT_HOME:/usr/share/ant CHROMEWEBDRIVER:/usr/local/share/chrome_driver CHROME_BIN:/usr/bin/google-chrome CONDA:/usr/share/miniconda DEBIAN_FRONTEND:noninteractive GECKOWEBDRIVER:/usr/local/share/gecko_driver GOROOT:/usr/local/go1.12 GOROOT_1_11_X64:/usr/local/go1.11 GOROOT_1_12_X64:/usr/local/go1.12 GOROOT_1_13_X64:/usr/local/go1.13 GRADLE_HOME:/usr/share/gradle ImageOS:ubuntu18 ImageVersion:dev JAVA_HOME:/usr/lib/jvm/zulu-8-azure-amd64 JAVA_HOME_11_X64:/usr/lib/jvm/zulu-11-azure-amd64 JAVA_HOME_12_X64:/usr/lib/jvm/zulu-12-azure-amd64 JAVA_HOME_7_X64:/usr/lib/jvm/zulu-7-azure-amd64 JAVA_HOME_8_X64:/usr/lib/jvm/zulu-8-azure-amd64 LEIN_HOME:/usr/local/lib/lein LEIN_JAR:/usr/local/lib/lein/self-installs/leiningen-2.9.1-standalone.jar M2_HOME:/usr/share/apache-maven-3.6.3 PATH:/usr/share/rust/.cargo/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/snap/bin SELENIUM_JAR_PATH:/usr/share/java/selenium-server-standalone.jar VCPKG_INSTALLATION_ROOT:/usr/local/share/vcpkg] 
DEBU[0000] context needs => map[]                       
DEBU[0000] context env => map[ACT:true AGENT_TOOLSDIRECTORY:/opt/hostedtoolcache ANT_HOME:/usr/share/ant CHROMEWEBDRIVER:/usr/local/share/chrome_driver CHROME_BIN:/usr/bin/google-chrome CI:true CONDA:/usr/share/miniconda DEBIAN_FRONTEND:noninteractive GECKOWEBDRIVER:/usr/local/share/gecko_driver GITHUB_ACTION:0 GITHUB_ACTIONS:true GITHUB_ACTION_REF: GITHUB_ACTION_REPOSITORY: GITHUB_ACTOR:nektos/act GITHUB_API_URL:https://api.github.com GITHUB_BASE_REF: GITHUB_ENV:/var/run/act/workflow/envs.txt GITHUB_EVENT_NAME:push GITHUB_EVENT_PATH:/var/run/act/workflow/event.json GITHUB_GRAPHQL_URL:https://api.github.com/graphql GITHUB_HEAD_REF: GITHUB_JOB:run_tests GITHUB_PATH:/var/run/act/workflow/paths.txt GITHUB_REF:refs/heads/master GITHUB_REPOSITORY:hexmode/test GITHUB_REPOSITORY_OWNER:hexmode GITHUB_RETENTION_DAYS:0 GITHUB_RUN_ID:1 GITHUB_RUN_NUMBER:1 GITHUB_SERVER_URL:https://github.com GITHUB_SHA:32a1389ffaa6046b444a42562109a2cdd1c29ba2 GITHUB_TOKEN: GITHUB_WORKFLOW:CI GITHUB_WORKSPACE:/home/mah/test GOROOT:/usr/local/go1.12 GOROOT_1_11_X64:/usr/local/go1.11 GOROOT_1_12_X64:/usr/local/go1.12 GOROOT_1_13_X64:/usr/local/go1.13 GRADLE_HOME:/usr/share/gradle INPUT_REPOSITORY:nektos/act ImageOS:ubuntu18 ImageVersion:dev JAVA_HOME:/usr/lib/jvm/zulu-8-azure-amd64 JAVA_HOME_11_X64:/usr/lib/jvm/zulu-11-azure-amd64 JAVA_HOME_12_X64:/usr/lib/jvm/zulu-12-azure-amd64 JAVA_HOME_7_X64:/usr/lib/jvm/zulu-7-azure-amd64 JAVA_HOME_8_X64:/usr/lib/jvm/zulu-8-azure-amd64 LEIN_HOME:/usr/local/lib/lein LEIN_JAR:/usr/local/lib/lein/self-installs/leiningen-2.9.1-standalone.jar M2_HOME:/usr/share/apache-maven-3.6.3 PATH:/usr/share/rust/.cargo/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/snap/bin RUNNER_PERFLOG:/dev/null RUNNER_TRACKING_ID: SELENIUM_JAR_PATH:/usr/share/java/selenium-server-standalone.jar VCPKG_INSTALLATION_ROOT:/usr/local/share/vcpkg] 
[CI/run_tests] setupEnv => map[ACT:true AGENT_TOOLSDIRECTORY:/opt/hostedtoolcache ANT_HOME:/usr/share/ant CHROMEWEBDRIVER:/usr/local/share/chrome_driver CHROME_BIN:/usr/bin/google-chrome CI:true CONDA:/usr/share/miniconda DEBIAN_FRONTEND:noninteractive GECKOWEBDRIVER:/usr/local/share/gecko_driver GITHUB_ACTION:0 GITHUB_ACTIONS:true GITHUB_ACTION_REF: GITHUB_ACTION_REPOSITORY: GITHUB_ACTOR:nektos/act GITHUB_API_URL:https://api.github.com GITHUB_BASE_REF: GITHUB_ENV:/var/run/act/workflow/envs.txt GITHUB_EVENT_NAME:push GITHUB_EVENT_PATH:/var/run/act/workflow/event.json GITHUB_GRAPHQL_URL:https://api.github.com/graphql GITHUB_HEAD_REF: GITHUB_JOB:run_tests GITHUB_PATH:/var/run/act/workflow/paths.txt GITHUB_REF:refs/heads/master GITHUB_REPOSITORY:hexmode/test GITHUB_REPOSITORY_OWNER:hexmode GITHUB_RETENTION_DAYS:0 GITHUB_RUN_ID:1 GITHUB_RUN_NUMBER:1 GITHUB_SERVER_URL:https://github.com GITHUB_SHA:32a1389ffaa6046b444a42562109a2cdd1c29ba2 GITHUB_TOKEN: GITHUB_WORKFLOW:CI GITHUB_WORKSPACE:/home/mah/test GOROOT:/usr/local/go1.12 GOROOT_1_11_X64:/usr/local/go1.11 GOROOT_1_12_X64:/usr/local/go1.12 GOROOT_1_13_X64:/usr/local/go1.13 GRADLE_HOME:/usr/share/gradle INPUT_REPOSITORY:nektos/act ImageOS:ubuntu18 ImageVersion:dev JAVA_HOME:/usr/lib/jvm/zulu-8-azure-amd64 JAVA_HOME_11_X64:/usr/lib/jvm/zulu-11-azure-amd64 JAVA_HOME_12_X64:/usr/lib/jvm/zulu-12-azure-amd64 JAVA_HOME_7_X64:/usr/lib/jvm/zulu-7-azure-amd64 JAVA_HOME_8_X64:/usr/lib/jvm/zulu-8-azure-amd64 LEIN_HOME:/usr/local/lib/lein LEIN_JAR:/usr/local/lib/lein/self-installs/leiningen-2.9.1-standalone.jar M2_HOME:/usr/share/apache-maven-3.6.3 PATH:/usr/share/rust/.cargo/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/snap/bin RUNNER_PERFLOG:/dev/null RUNNER_TRACKING_ID: SELENIUM_JAR_PATH:/usr/share/java/selenium-server-standalone.jar VCPKG_INSTALLATION_ROOT:/usr/local/share/vcpkg]
[CI/run_tests] ⭐  Run actions/checkout@v2
DEBU[0000] Loading slug from git directory '/home/mah/test/.git' 
DEBU[0000] Found revision: 32a1389ffaa6046b444a42562109a2cdd1c29ba2 
DEBU[0000] Loading revision from git directory '/home/mah/test/.git' 
DEBU[0000] Found revision: 32a1389ffaa6046b444a42562109a2cdd1c29ba2 
DEBU[0000] HEAD points to '32a1389ffaa6046b444a42562109a2cdd1c29ba2' 
DEBU[0000] using github ref: refs/heads/master          
INFO[0000]   ☁  git clone 'https://github.com/actions/checkout' # ref=v2 
DEBU[0000]   cloning https://github.com/actions/checkout to /home/mah/.cache/act/actions-checkout@v2 
DEBU[0000] Unable to pull refs/heads/v2: worktree contains unstaged changes 
DEBU[0000] Cloned https://github.com/actions/checkout to /home/mah/.cache/act/actions-checkout@v2 
DEBU[0000] Checked out v2                               
DEBU[0000] Read action &{Checkout  Checkout a Git repository at a particular version map[clean:{Whether to execute `git clean -ffdx && git reset --hard HEAD` before fetching false true} fetch-depth:{Number of commits to fetch. 0 indicates all history for all branches and tags. false 1} lfs:{Whether to download Git-LFS files false false} path:{Relative path under $GITHUB_WORKSPACE to place the repository false } persist-credentials:{Whether to configure the token or SSH key with the local git config false true} ref:{The branch, tag or SHA to checkout. When checking out the repository that triggered a workflow, this defaults to the reference or SHA for that event.  Otherwise, uses the default branch.
 false } repository:{Repository name with owner. For example, actions/checkout false ${{ github.repository }}} ssh-key:{SSH key used to fetch the repository. The SSH key is configured with the local git config, which enables your scripts to run authenticated git commands. The post-job step removes the SSH key.

We recommend using a service account with the least permissions necessary.

[Learn more about creating and using encrypted secrets](https://help.github.com/en/actions/automating-your-workflow-with-github-actions/creating-and-using-encrypted-secrets)
 false } ssh-known-hosts:{Known hosts in addition to the user and global host key database. The public SSH keys for a host may be obtained using the utility `ssh-keyscan`. For example, `ssh-keyscan github.com`. The public key for github.com is always implicitly added.
 false } ssh-strict:{Whether to perform strict host key checking. When true, adds the options `StrictHostKeyChecking=yes` and `CheckHostIP=no` to the SSH command line. Use the input `ssh-known-hosts` to configure additional hosts.
 false true} submodules:{Whether to checkout submodules: `true` to checkout submodules or `recursive` to recursively checkout submodules.

When the `ssh-key` input is not provided, SSH URLs beginning with `git@github.com:` are converted to HTTPS.
 false false} token:{Personal access token (PAT) used to fetch the repository. The PAT is configured with the local git config, which enables your scripts to run authenticated git commands. The post-job step removes the PAT.

We recommend using a service account with the least permissions necessary. Also when generating a new PAT, select the least scopes necessary.

[Learn more about creating and using encrypted secrets](https://help.github.com/en/actions/automating-your-workflow-with-github-actions/creating-and-using-encrypted-secrets)
 false ${{ github.token }}}] map[] {node12 map[] dist/index.js  [] [] []} { }} from 'Unknown' 
DEBU[0000] About to run action &{Checkout  Checkout a Git repository at a particular version map[clean:{Whether to execute `git clean -ffdx && git reset --hard HEAD` before fetching false true} fetch-depth:{Number of commits to fetch. 0 indicates all history for all branches and tags. false 1} lfs:{Whether to download Git-LFS files false false} path:{Relative path under $GITHUB_WORKSPACE to place the repository false } persist-credentials:{Whether to configure the token or SSH key with the local git config false true} ref:{The branch, tag or SHA to checkout. When checking out the repository that triggered a workflow, this defaults to the reference or SHA for that event.  Otherwise, uses the default branch.
 false } repository:{Repository name with owner. For example, actions/checkout false ${{ github.repository }}} ssh-key:{SSH key used to fetch the repository. The SSH key is configured with the local git config, which enables your scripts to run authenticated git commands. The post-job step removes the SSH key.

We recommend using a service account with the least permissions necessary.

[Learn more about creating and using encrypted secrets](https://help.github.com/en/actions/automating-your-workflow-with-github-actions/creating-and-using-encrypted-secrets)
 false } ssh-known-hosts:{Known hosts in addition to the user and global host key database. The public SSH keys for a host may be obtained using the utility `ssh-keyscan`. For example, `ssh-keyscan github.com`. The public key for github.com is always implicitly added.
 false } ssh-strict:{Whether to perform strict host key checking. When true, adds the options `StrictHostKeyChecking=yes` and `CheckHostIP=no` to the SSH command line. Use the input `ssh-known-hosts` to configure additional hosts.
 false true} submodules:{Whether to checkout submodules: `true` to checkout submodules or `recursive` to recursively checkout submodules.

When the `ssh-key` input is not provided, SSH URLs beginning with `git@github.com:` are converted to HTTPS.
 false false} token:{Personal access token (PAT) used to fetch the repository. The PAT is configured with the local git config, which enables your scripts to run authenticated git commands. The post-job step removes the PAT.

We recommend using a service account with the least permissions necessary. Also when generating a new PAT, select the least scopes necessary.

[Learn more about creating and using encrypted secrets](https://help.github.com/en/actions/automating-your-workflow-with-github-actions/creating-and-using-encrypted-secrets)
 false ${{ github.token }}}] map[] {node12 map[] dist/index.js  [] [] []} { }} 
DEBU[0000] Evaluating 'github['token']' instead of 'github.token' 
DEBU[0000] type=3 actionDir=/home/mah/.cache/act/actions-checkout@v2 actionPath= Workdir=/home/mah/test ActionCacheDir=/home/mah/.cache/act actionName=actions-checkout@v2 containerActionDir=/var/run/act/actions/actions-checkout@v2 
DEBU[0000] Removing /home/mah/.cache/act/actions-checkout@v2/.gitignore before docker cp 
[CI/run_tests]   🐳  docker cp src=/home/mah/.cache/act/actions-checkout@v2/ dst=/var/run/act/actions/actions-checkout@v2/
[CI/run_tests]   🐳  docker exec cmd=[mkdir -p /var/run/act/actions/actions-checkout@v2/] user=
[CI/run_tests] Exec command '[mkdir -p /var/run/act/actions/actions-checkout@v2/]'
DEBU[0000] Writing tarball /tmp/act154772472 from /home/mah/.cache/act/actions-checkout@v2/ 
DEBU[0000] Stripping prefix:/home/mah/.cache/act/actions-checkout@v2/ src:/home/mah/.cache/act/actions-checkout@v2/ 
[CI/run_tests] Extracting content from '/tmp/act154772472' to '/var/run/act/actions/actions-checkout@v2/'
DEBU[0001] executing remote job container: [node /var/run/act/actions/actions-checkout@v2/dist/index.js] 
[CI/run_tests]   🐳  docker exec cmd=[node /var/run/act/actions/actions-checkout@v2/dist/index.js] user=
[CI/run_tests] Exec command '[node /var/run/act/actions/actions-checkout@v2/dist/index.js]'
[CI/run_tests]   ❓  ::save-state name=isPost::true
[CI/run_tests]   💬  ::debug::GITHUB_WORKSPACE = '/home/mah/test'
[CI/run_tests]   💬  ::debug::qualified repository = 'nektos/act'
[CI/run_tests]   💬  ::debug::ref = ''
[CI/run_tests]   💬  ::debug::commit = 'undefined'
[CI/run_tests]   💬  ::debug::clean = true
[CI/run_tests]   💬  ::debug::fetch depth = 1
[CI/run_tests]   💬  ::debug::lfs = false
[CI/run_tests]   💬  ::debug::submodules = false
[CI/run_tests]   💬  ::debug::recursive submodules = false
[CI/run_tests]   ❗  ::error::Input required and not supplied: token
DEBU[0001] exit with `FAILURE`: 1                       
[CI/run_tests]   ❌  Failure - actions/checkout@v2
DEBU[0001] exit with `FAILURE`: 1                       
Error: exit with `FAILURE`: 1

Workflow and/or repository

workflow
name: CI

on:
  push:

jobs:
  run_tests:
    runs-on: ubuntu-18.04
    steps:
      - uses: actions/checkout@v2
        with:
          repository: nektos/act
Originally created by @hexmode on GitHub (Nov 14, 2021). Original GitHub issue: https://github.com/nektos/act/issues/881 ## System information - Operating System: linux centos 8 stream - Architecture: x64 - Apple M1: no - Docker version: 20.10.10 - Docker image used in `act`: nektos/act-environments-ubuntu:18.04 - `act` version: 0.2.24 ## Expected behaviour <details> <summary>git task run</summary> ```none Run actions/checkout@v2 (node:2505) [DEP0005] DeprecationWarning: Buffer() is deprecated due to security and usability issues. Please use the Buffer.alloc(), Buffer.allocUnsafe(), or Buffer.from() methods instead. Syncing repository: nektos/act Getting Git version info Working directory is '/home/runner/work/test/test' /usr/bin/git version git version 2.33.1 Deleting the contents of '/home/runner/work/test/test' Initializing the repository /usr/bin/git init /home/runner/work/test/test hint: Using 'master' as the name for the initial branch. This default branch name hint: is subject to change. To configure the initial branch name to use in all hint: of your new repositories, which will suppress this warning, call: hint: hint: git config --global init.defaultBranch <name> hint: hint: Names commonly chosen instead of 'master' are 'main', 'trunk' and hint: 'development'. The just-created branch can be renamed via this command: hint: hint: git branch -m <name> Initialized empty Git repository in /home/runner/work/test/test/.git/ /usr/bin/git remote add origin https://github.com/nektos/act Disabling automatic garbage collection /usr/bin/git config --local gc.auto 0 Setting up auth /usr/bin/git config --local --name-only --get-regexp core\.sshCommand /usr/bin/git submodule foreach --recursive git config --local --name-only --get-regexp 'core\.sshCommand' && git config --local --unset-all 'core.sshCommand' || : /usr/bin/git config --local --name-only --get-regexp http\.https\:\/\/github\.com\/\.extraheader /usr/bin/git submodule foreach --recursive git config --local --name-only --get-regexp 'http\.https\:\/\/github\.com\/\.extraheader' && git config --local --unset-all 'http.https://github.com/.extraheader' || : /usr/bin/git config --local http.https://github.com/.extraheader AUTHORIZATION: basic *** Determining the default branch Retrieving the default branch name Default branch 'master' Fetching the repository /usr/bin/git -c protocol.version=2 fetch --no-tags --prune --progress --no-recurse-submodules --depth=1 origin +refs/heads/master:refs/remotes/origin/master remote: Enumerating objects: 236, done. remote: Counting objects: 0% (1/236) remote: Counting objects: 1% (3/236) ... Resolving deltas: 100% (12/12) Resolving deltas: 100% (12/12), done. From https://github.com/nektos/act * [new branch] master -> origin/master Determining the checkout info Checking out the ref /usr/bin/git checkout --progress --force -B master refs/remotes/origin/master Reset branch 'master' Branch 'master' set up to track remote branch 'master' from 'origin'. /usr/bin/git log -1 --format='%H' '12fa4d703da8d05930303acbe6bbc8fd00c77de7' 0s Post job cleanup. /usr/bin/git version git version 2.33.1 /usr/bin/git config --local --name-only --get-regexp core\.sshCommand /usr/bin/git submodule foreach --recursive git config --local --name-only --get-regexp 'core\.sshCommand' && git config --local --unset-all 'core.sshCommand' || : /usr/bin/git config --local --name-only --get-regexp http\.https\:\/\/github\.com\/\.extraheader http.https://github.com/.extraheader /usr/bin/git config --local --unset-all http.https://github.com/.extraheader /usr/bin/git submodule foreach --recursive git config --local --name-only --get-regexp 'http\.https\:\/\/github\.com\/\.extraheader' && git config --local --unset-all 'http.https://github.com/.extraheader' || : ``` </details> ## Actual behaviour <details> <summary>act run on same repo</summary> ```none DEBU[0000] Loading environment from /home/mah/test/.env DEBU[0000] Loading secrets from /home/mah/test/.secrets DEBU[0000] Loading workflows from '/home/mah/test/.github/workflows' DEBU[0000] Loading workflows recursively DEBU[0000] Found workflow 'tmp.yml' in '/home/mah/test/.github/workflows/tmp.yml' DEBU[0000] Reading workflow '/home/mah/test/.github/workflows/tmp.yml' DEBU[0000] Correcting if statements '/home/mah/test/.github/workflows/tmp.yml' DEBU[0000] Planning event: push DEBU[0000] Loading slug from git directory '/home/mah/test/.git' DEBU[0000] Found revision: 32a1389ffaa6046b444a42562109a2cdd1c29ba2 DEBU[0000] Loading revision from git directory '/home/mah/test/.git' DEBU[0000] Found revision: 32a1389ffaa6046b444a42562109a2cdd1c29ba2 DEBU[0000] HEAD points to '32a1389ffaa6046b444a42562109a2cdd1c29ba2' DEBU[0000] using github ref: refs/heads/master DEBU[0000] context env => map[ACT:true] DEBU[0000] context needs => map[] [CI/run_tests] 🚀 Start image=nektos/act-environments-ubuntu:18.04 DEBU[0000] Loading slug from git directory '/home/mah/test/.git' DEBU[0000] Found revision: 32a1389ffaa6046b444a42562109a2cdd1c29ba2 DEBU[0000] Loading revision from git directory '/home/mah/test/.git' DEBU[0000] Found revision: 32a1389ffaa6046b444a42562109a2cdd1c29ba2 DEBU[0000] HEAD points to '32a1389ffaa6046b444a42562109a2cdd1c29ba2' DEBU[0000] using github ref: refs/heads/master [CI/run_tests] 🐳 docker pull nektos/act-environments-ubuntu:18.04 DEBU[0000] Image exists? true [CI/run_tests] Removed container: 6bb0fdbacea9022abb8521c7174b8b291b05c38a4cd573315a8598d02e59c915 [CI/run_tests] 🐳 docker volume rm act-CI-run-tests [CI/run_tests] 🐳 docker create image=nektos/act-environments-ubuntu:18.04 platform= entrypoint=["/usr/bin/tail" "-f" "/dev/null"] cmd=[] [CI/run_tests] Created container name=act-CI-run-tests id=0ddb19d4a843f001e2f09857479c1bceb0e34cb3daa80ca9643a3de37376c9b2 from image nektos/act-environments-ubuntu:18.04 (platform: ) [CI/run_tests] ENV ==> [RUNNER_TOOL_CACHE=/opt/hostedtoolcache RUNNER_OS=Linux RUNNER_TEMP=/tmp] [CI/run_tests] 🐳 docker run image=nektos/act-environments-ubuntu:18.04 platform= entrypoint=["/usr/bin/tail" "-f" "/dev/null"] cmd=[] [CI/run_tests] Starting container: 0ddb19d4a843f001e2f09857479c1bceb0e34cb3daa80ca9643a3de37376c9b2 [CI/run_tests] Started container: 0ddb19d4a843f001e2f09857479c1bceb0e34cb3daa80ca9643a3de37376c9b2 [CI/run_tests] 🐳 docker exec cmd=[mkdir -m 0777 -p /var/run/act] user=root [CI/run_tests] Exec command '[mkdir -m 0777 -p /var/run/act]' DEBU[0000] Writing entry to tarball workflow/event.json len:2 DEBU[0000] Writing entry to tarball workflow/envs.txt len:0 DEBU[0000] Writing entry to tarball workflow/paths.txt len:0 [CI/run_tests] Extracting content to '/var/run/act/' DEBU[0000] Loading slug from git directory '/home/mah/test/.git' DEBU[0000] Found revision: 32a1389ffaa6046b444a42562109a2cdd1c29ba2 DEBU[0000] Loading revision from git directory '/home/mah/test/.git' DEBU[0000] Found revision: 32a1389ffaa6046b444a42562109a2cdd1c29ba2 DEBU[0000] HEAD points to '32a1389ffaa6046b444a42562109a2cdd1c29ba2' DEBU[0000] using github ref: refs/heads/master DEBU[0000] Loading slug from git directory '/home/mah/test/.git' DEBU[0000] Found revision: 32a1389ffaa6046b444a42562109a2cdd1c29ba2 DEBU[0000] Loading revision from git directory '/home/mah/test/.git' DEBU[0000] Found revision: 32a1389ffaa6046b444a42562109a2cdd1c29ba2 DEBU[0000] HEAD points to '32a1389ffaa6046b444a42562109a2cdd1c29ba2' DEBU[0000] using github ref: refs/heads/master DEBU[0000] context env => map[ACT:true AGENT_TOOLSDIRECTORY:/opt/hostedtoolcache ANT_HOME:/usr/share/ant CHROMEWEBDRIVER:/usr/local/share/chrome_driver CHROME_BIN:/usr/bin/google-chrome CONDA:/usr/share/miniconda DEBIAN_FRONTEND:noninteractive GECKOWEBDRIVER:/usr/local/share/gecko_driver GOROOT:/usr/local/go1.12 GOROOT_1_11_X64:/usr/local/go1.11 GOROOT_1_12_X64:/usr/local/go1.12 GOROOT_1_13_X64:/usr/local/go1.13 GRADLE_HOME:/usr/share/gradle ImageOS:ubuntu18 ImageVersion:dev JAVA_HOME:/usr/lib/jvm/zulu-8-azure-amd64 JAVA_HOME_11_X64:/usr/lib/jvm/zulu-11-azure-amd64 JAVA_HOME_12_X64:/usr/lib/jvm/zulu-12-azure-amd64 JAVA_HOME_7_X64:/usr/lib/jvm/zulu-7-azure-amd64 JAVA_HOME_8_X64:/usr/lib/jvm/zulu-8-azure-amd64 LEIN_HOME:/usr/local/lib/lein LEIN_JAR:/usr/local/lib/lein/self-installs/leiningen-2.9.1-standalone.jar M2_HOME:/usr/share/apache-maven-3.6.3 PATH:/usr/share/rust/.cargo/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/snap/bin SELENIUM_JAR_PATH:/usr/share/java/selenium-server-standalone.jar VCPKG_INSTALLATION_ROOT:/usr/local/share/vcpkg] DEBU[0000] context needs => map[] DEBU[0000] Loading slug from git directory '/home/mah/test/.git' DEBU[0000] Found revision: 32a1389ffaa6046b444a42562109a2cdd1c29ba2 DEBU[0000] Loading revision from git directory '/home/mah/test/.git' DEBU[0000] Found revision: 32a1389ffaa6046b444a42562109a2cdd1c29ba2 DEBU[0000] HEAD points to '32a1389ffaa6046b444a42562109a2cdd1c29ba2' DEBU[0000] using github ref: refs/heads/master DEBU[0000] context env => map[ACT:true AGENT_TOOLSDIRECTORY:/opt/hostedtoolcache ANT_HOME:/usr/share/ant CHROMEWEBDRIVER:/usr/local/share/chrome_driver CHROME_BIN:/usr/bin/google-chrome CONDA:/usr/share/miniconda DEBIAN_FRONTEND:noninteractive GECKOWEBDRIVER:/usr/local/share/gecko_driver GOROOT:/usr/local/go1.12 GOROOT_1_11_X64:/usr/local/go1.11 GOROOT_1_12_X64:/usr/local/go1.12 GOROOT_1_13_X64:/usr/local/go1.13 GRADLE_HOME:/usr/share/gradle ImageOS:ubuntu18 ImageVersion:dev JAVA_HOME:/usr/lib/jvm/zulu-8-azure-amd64 JAVA_HOME_11_X64:/usr/lib/jvm/zulu-11-azure-amd64 JAVA_HOME_12_X64:/usr/lib/jvm/zulu-12-azure-amd64 JAVA_HOME_7_X64:/usr/lib/jvm/zulu-7-azure-amd64 JAVA_HOME_8_X64:/usr/lib/jvm/zulu-8-azure-amd64 LEIN_HOME:/usr/local/lib/lein LEIN_JAR:/usr/local/lib/lein/self-installs/leiningen-2.9.1-standalone.jar M2_HOME:/usr/share/apache-maven-3.6.3 PATH:/usr/share/rust/.cargo/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/snap/bin SELENIUM_JAR_PATH:/usr/share/java/selenium-server-standalone.jar VCPKG_INSTALLATION_ROOT:/usr/local/share/vcpkg] DEBU[0000] context needs => map[] DEBU[0000] context env => map[ACT:true AGENT_TOOLSDIRECTORY:/opt/hostedtoolcache ANT_HOME:/usr/share/ant CHROMEWEBDRIVER:/usr/local/share/chrome_driver CHROME_BIN:/usr/bin/google-chrome CI:true CONDA:/usr/share/miniconda DEBIAN_FRONTEND:noninteractive GECKOWEBDRIVER:/usr/local/share/gecko_driver GITHUB_ACTION:0 GITHUB_ACTIONS:true GITHUB_ACTION_REF: GITHUB_ACTION_REPOSITORY: GITHUB_ACTOR:nektos/act GITHUB_API_URL:https://api.github.com GITHUB_BASE_REF: GITHUB_ENV:/var/run/act/workflow/envs.txt GITHUB_EVENT_NAME:push GITHUB_EVENT_PATH:/var/run/act/workflow/event.json GITHUB_GRAPHQL_URL:https://api.github.com/graphql GITHUB_HEAD_REF: GITHUB_JOB:run_tests GITHUB_PATH:/var/run/act/workflow/paths.txt GITHUB_REF:refs/heads/master GITHUB_REPOSITORY:hexmode/test GITHUB_REPOSITORY_OWNER:hexmode GITHUB_RETENTION_DAYS:0 GITHUB_RUN_ID:1 GITHUB_RUN_NUMBER:1 GITHUB_SERVER_URL:https://github.com GITHUB_SHA:32a1389ffaa6046b444a42562109a2cdd1c29ba2 GITHUB_TOKEN: GITHUB_WORKFLOW:CI GITHUB_WORKSPACE:/home/mah/test GOROOT:/usr/local/go1.12 GOROOT_1_11_X64:/usr/local/go1.11 GOROOT_1_12_X64:/usr/local/go1.12 GOROOT_1_13_X64:/usr/local/go1.13 GRADLE_HOME:/usr/share/gradle INPUT_REPOSITORY:nektos/act ImageOS:ubuntu18 ImageVersion:dev JAVA_HOME:/usr/lib/jvm/zulu-8-azure-amd64 JAVA_HOME_11_X64:/usr/lib/jvm/zulu-11-azure-amd64 JAVA_HOME_12_X64:/usr/lib/jvm/zulu-12-azure-amd64 JAVA_HOME_7_X64:/usr/lib/jvm/zulu-7-azure-amd64 JAVA_HOME_8_X64:/usr/lib/jvm/zulu-8-azure-amd64 LEIN_HOME:/usr/local/lib/lein LEIN_JAR:/usr/local/lib/lein/self-installs/leiningen-2.9.1-standalone.jar M2_HOME:/usr/share/apache-maven-3.6.3 PATH:/usr/share/rust/.cargo/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/snap/bin RUNNER_PERFLOG:/dev/null RUNNER_TRACKING_ID: SELENIUM_JAR_PATH:/usr/share/java/selenium-server-standalone.jar VCPKG_INSTALLATION_ROOT:/usr/local/share/vcpkg] [CI/run_tests] setupEnv => map[ACT:true AGENT_TOOLSDIRECTORY:/opt/hostedtoolcache ANT_HOME:/usr/share/ant CHROMEWEBDRIVER:/usr/local/share/chrome_driver CHROME_BIN:/usr/bin/google-chrome CI:true CONDA:/usr/share/miniconda DEBIAN_FRONTEND:noninteractive GECKOWEBDRIVER:/usr/local/share/gecko_driver GITHUB_ACTION:0 GITHUB_ACTIONS:true GITHUB_ACTION_REF: GITHUB_ACTION_REPOSITORY: GITHUB_ACTOR:nektos/act GITHUB_API_URL:https://api.github.com GITHUB_BASE_REF: GITHUB_ENV:/var/run/act/workflow/envs.txt GITHUB_EVENT_NAME:push GITHUB_EVENT_PATH:/var/run/act/workflow/event.json GITHUB_GRAPHQL_URL:https://api.github.com/graphql GITHUB_HEAD_REF: GITHUB_JOB:run_tests GITHUB_PATH:/var/run/act/workflow/paths.txt GITHUB_REF:refs/heads/master GITHUB_REPOSITORY:hexmode/test GITHUB_REPOSITORY_OWNER:hexmode GITHUB_RETENTION_DAYS:0 GITHUB_RUN_ID:1 GITHUB_RUN_NUMBER:1 GITHUB_SERVER_URL:https://github.com GITHUB_SHA:32a1389ffaa6046b444a42562109a2cdd1c29ba2 GITHUB_TOKEN: GITHUB_WORKFLOW:CI GITHUB_WORKSPACE:/home/mah/test GOROOT:/usr/local/go1.12 GOROOT_1_11_X64:/usr/local/go1.11 GOROOT_1_12_X64:/usr/local/go1.12 GOROOT_1_13_X64:/usr/local/go1.13 GRADLE_HOME:/usr/share/gradle INPUT_REPOSITORY:nektos/act ImageOS:ubuntu18 ImageVersion:dev JAVA_HOME:/usr/lib/jvm/zulu-8-azure-amd64 JAVA_HOME_11_X64:/usr/lib/jvm/zulu-11-azure-amd64 JAVA_HOME_12_X64:/usr/lib/jvm/zulu-12-azure-amd64 JAVA_HOME_7_X64:/usr/lib/jvm/zulu-7-azure-amd64 JAVA_HOME_8_X64:/usr/lib/jvm/zulu-8-azure-amd64 LEIN_HOME:/usr/local/lib/lein LEIN_JAR:/usr/local/lib/lein/self-installs/leiningen-2.9.1-standalone.jar M2_HOME:/usr/share/apache-maven-3.6.3 PATH:/usr/share/rust/.cargo/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/snap/bin RUNNER_PERFLOG:/dev/null RUNNER_TRACKING_ID: SELENIUM_JAR_PATH:/usr/share/java/selenium-server-standalone.jar VCPKG_INSTALLATION_ROOT:/usr/local/share/vcpkg] [CI/run_tests] ⭐ Run actions/checkout@v2 DEBU[0000] Loading slug from git directory '/home/mah/test/.git' DEBU[0000] Found revision: 32a1389ffaa6046b444a42562109a2cdd1c29ba2 DEBU[0000] Loading revision from git directory '/home/mah/test/.git' DEBU[0000] Found revision: 32a1389ffaa6046b444a42562109a2cdd1c29ba2 DEBU[0000] HEAD points to '32a1389ffaa6046b444a42562109a2cdd1c29ba2' DEBU[0000] using github ref: refs/heads/master INFO[0000] ☁ git clone 'https://github.com/actions/checkout' # ref=v2 DEBU[0000] cloning https://github.com/actions/checkout to /home/mah/.cache/act/actions-checkout@v2 DEBU[0000] Unable to pull refs/heads/v2: worktree contains unstaged changes DEBU[0000] Cloned https://github.com/actions/checkout to /home/mah/.cache/act/actions-checkout@v2 DEBU[0000] Checked out v2 DEBU[0000] Read action &{Checkout Checkout a Git repository at a particular version map[clean:{Whether to execute `git clean -ffdx && git reset --hard HEAD` before fetching false true} fetch-depth:{Number of commits to fetch. 0 indicates all history for all branches and tags. false 1} lfs:{Whether to download Git-LFS files false false} path:{Relative path under $GITHUB_WORKSPACE to place the repository false } persist-credentials:{Whether to configure the token or SSH key with the local git config false true} ref:{The branch, tag or SHA to checkout. When checking out the repository that triggered a workflow, this defaults to the reference or SHA for that event. Otherwise, uses the default branch. false } repository:{Repository name with owner. For example, actions/checkout false ${{ github.repository }}} ssh-key:{SSH key used to fetch the repository. The SSH key is configured with the local git config, which enables your scripts to run authenticated git commands. The post-job step removes the SSH key. We recommend using a service account with the least permissions necessary. [Learn more about creating and using encrypted secrets](https://help.github.com/en/actions/automating-your-workflow-with-github-actions/creating-and-using-encrypted-secrets) false } ssh-known-hosts:{Known hosts in addition to the user and global host key database. The public SSH keys for a host may be obtained using the utility `ssh-keyscan`. For example, `ssh-keyscan github.com`. The public key for github.com is always implicitly added. false } ssh-strict:{Whether to perform strict host key checking. When true, adds the options `StrictHostKeyChecking=yes` and `CheckHostIP=no` to the SSH command line. Use the input `ssh-known-hosts` to configure additional hosts. false true} submodules:{Whether to checkout submodules: `true` to checkout submodules or `recursive` to recursively checkout submodules. When the `ssh-key` input is not provided, SSH URLs beginning with `git@github.com:` are converted to HTTPS. false false} token:{Personal access token (PAT) used to fetch the repository. The PAT is configured with the local git config, which enables your scripts to run authenticated git commands. The post-job step removes the PAT. We recommend using a service account with the least permissions necessary. Also when generating a new PAT, select the least scopes necessary. [Learn more about creating and using encrypted secrets](https://help.github.com/en/actions/automating-your-workflow-with-github-actions/creating-and-using-encrypted-secrets) false ${{ github.token }}}] map[] {node12 map[] dist/index.js [] [] []} { }} from 'Unknown' DEBU[0000] About to run action &{Checkout Checkout a Git repository at a particular version map[clean:{Whether to execute `git clean -ffdx && git reset --hard HEAD` before fetching false true} fetch-depth:{Number of commits to fetch. 0 indicates all history for all branches and tags. false 1} lfs:{Whether to download Git-LFS files false false} path:{Relative path under $GITHUB_WORKSPACE to place the repository false } persist-credentials:{Whether to configure the token or SSH key with the local git config false true} ref:{The branch, tag or SHA to checkout. When checking out the repository that triggered a workflow, this defaults to the reference or SHA for that event. Otherwise, uses the default branch. false } repository:{Repository name with owner. For example, actions/checkout false ${{ github.repository }}} ssh-key:{SSH key used to fetch the repository. The SSH key is configured with the local git config, which enables your scripts to run authenticated git commands. The post-job step removes the SSH key. We recommend using a service account with the least permissions necessary. [Learn more about creating and using encrypted secrets](https://help.github.com/en/actions/automating-your-workflow-with-github-actions/creating-and-using-encrypted-secrets) false } ssh-known-hosts:{Known hosts in addition to the user and global host key database. The public SSH keys for a host may be obtained using the utility `ssh-keyscan`. For example, `ssh-keyscan github.com`. The public key for github.com is always implicitly added. false } ssh-strict:{Whether to perform strict host key checking. When true, adds the options `StrictHostKeyChecking=yes` and `CheckHostIP=no` to the SSH command line. Use the input `ssh-known-hosts` to configure additional hosts. false true} submodules:{Whether to checkout submodules: `true` to checkout submodules or `recursive` to recursively checkout submodules. When the `ssh-key` input is not provided, SSH URLs beginning with `git@github.com:` are converted to HTTPS. false false} token:{Personal access token (PAT) used to fetch the repository. The PAT is configured with the local git config, which enables your scripts to run authenticated git commands. The post-job step removes the PAT. We recommend using a service account with the least permissions necessary. Also when generating a new PAT, select the least scopes necessary. [Learn more about creating and using encrypted secrets](https://help.github.com/en/actions/automating-your-workflow-with-github-actions/creating-and-using-encrypted-secrets) false ${{ github.token }}}] map[] {node12 map[] dist/index.js [] [] []} { }} DEBU[0000] Evaluating 'github['token']' instead of 'github.token' DEBU[0000] type=3 actionDir=/home/mah/.cache/act/actions-checkout@v2 actionPath= Workdir=/home/mah/test ActionCacheDir=/home/mah/.cache/act actionName=actions-checkout@v2 containerActionDir=/var/run/act/actions/actions-checkout@v2 DEBU[0000] Removing /home/mah/.cache/act/actions-checkout@v2/.gitignore before docker cp [CI/run_tests] 🐳 docker cp src=/home/mah/.cache/act/actions-checkout@v2/ dst=/var/run/act/actions/actions-checkout@v2/ [CI/run_tests] 🐳 docker exec cmd=[mkdir -p /var/run/act/actions/actions-checkout@v2/] user= [CI/run_tests] Exec command '[mkdir -p /var/run/act/actions/actions-checkout@v2/]' DEBU[0000] Writing tarball /tmp/act154772472 from /home/mah/.cache/act/actions-checkout@v2/ DEBU[0000] Stripping prefix:/home/mah/.cache/act/actions-checkout@v2/ src:/home/mah/.cache/act/actions-checkout@v2/ [CI/run_tests] Extracting content from '/tmp/act154772472' to '/var/run/act/actions/actions-checkout@v2/' DEBU[0001] executing remote job container: [node /var/run/act/actions/actions-checkout@v2/dist/index.js] [CI/run_tests] 🐳 docker exec cmd=[node /var/run/act/actions/actions-checkout@v2/dist/index.js] user= [CI/run_tests] Exec command '[node /var/run/act/actions/actions-checkout@v2/dist/index.js]' [CI/run_tests] ❓ ::save-state name=isPost::true [CI/run_tests] 💬 ::debug::GITHUB_WORKSPACE = '/home/mah/test' [CI/run_tests] 💬 ::debug::qualified repository = 'nektos/act' [CI/run_tests] 💬 ::debug::ref = '' [CI/run_tests] 💬 ::debug::commit = 'undefined' [CI/run_tests] 💬 ::debug::clean = true [CI/run_tests] 💬 ::debug::fetch depth = 1 [CI/run_tests] 💬 ::debug::lfs = false [CI/run_tests] 💬 ::debug::submodules = false [CI/run_tests] 💬 ::debug::recursive submodules = false [CI/run_tests] ❗ ::error::Input required and not supplied: token DEBU[0001] exit with `FAILURE`: 1 [CI/run_tests] ❌ Failure - actions/checkout@v2 DEBU[0001] exit with `FAILURE`: 1 Error: exit with `FAILURE`: 1 ``` </details> ## Workflow and/or repository <details> <summary>workflow</summary> ```none name: CI on: push: jobs: run_tests: runs-on: ubuntu-18.04 steps: - uses: actions/checkout@v2 with: repository: nektos/act ``` </details>
kerem 2026-03-01 21:44:11 +03:00
Author
Owner

@catthehacker commented on GitHub (Nov 14, 2021):

What is the problem?

<!-- gh-comment-id:968275887 --> @catthehacker commented on GitHub (Nov 14, 2021): What is the problem?
Author
Owner

@hexmode commented on GitHub (Nov 14, 2021):

I put it in the issue title, but, to expand, this section of the github action is not performed:

Setting up auth
  /usr/bin/git config --local --name-only --get-regexp core\.sshCommand
  /usr/bin/git submodule foreach --recursive git config --local --name-only --get-regexp 'core\.sshCommand' && git config --local --unset-all 'core.sshCommand' || :
  /usr/bin/git config --local --name-only --get-regexp http\.https\:\/\/github\.com\/\.extraheader
  /usr/bin/git submodule foreach --recursive git config --local --name-only --get-regexp 'http\.https\:\/\/github\.com\/\.extraheader' && git config --local --unset-all 'http.https://github.com/.extraheader' || :
  /usr/bin/git config --local http.https://github.com/.extraheader AUTHORIZATION: basic ***
Determining the default branch
  Retrieving the default branch name

You can see in the act run this comment:

When the `ssh-key` input is not provided, SSH URLs beginning with `git@github.com:` are converted to HTTPS.

but the corresponding commands from the github action run are never executed.

<!-- gh-comment-id:968302512 --> @hexmode commented on GitHub (Nov 14, 2021): I put it in the issue title, but, to expand, this section of the github action is not performed: <details> <summary>Setting up auth</summary> ``` /usr/bin/git config --local --name-only --get-regexp core\.sshCommand /usr/bin/git submodule foreach --recursive git config --local --name-only --get-regexp 'core\.sshCommand' && git config --local --unset-all 'core.sshCommand' || : /usr/bin/git config --local --name-only --get-regexp http\.https\:\/\/github\.com\/\.extraheader /usr/bin/git submodule foreach --recursive git config --local --name-only --get-regexp 'http\.https\:\/\/github\.com\/\.extraheader' && git config --local --unset-all 'http.https://github.com/.extraheader' || : /usr/bin/git config --local http.https://github.com/.extraheader AUTHORIZATION: basic *** Determining the default branch Retrieving the default branch name ``` </details> You can see in the `act` run this comment: ``` When the `ssh-key` input is not provided, SSH URLs beginning with `git@github.com:` are converted to HTTPS. ``` but the corresponding commands from the github action run are never executed.
Author
Owner

@hexmode commented on GitHub (Nov 14, 2021):

This is my fault. I did not set GITHUB_TOKEN.

This suggests that "MAKE SURE YOUR GITHUB_TOKEN IS SET IF YOU ARE TRYING TO USE ACTIONS THAT REQUIRE IT" should be a more visible message in the documentation and displayed on failure for a possible fix to the failure.

GITHUB_TOKEN was in the environment, but it was empty. When it is set in the environment is a good time to highlight that it is not available.

Looking around for how GITHUB_TOKEN is set, I saw the documentation I found a brief reference in the README.

Since the token is used for various Github services and this tool is meant to "Run your GitHub Actions locally", that would suggest that this should be more clearly spelled out.

I've updated the issue title so that it this (suggesting setting the GITHUB_TOKEN secret) is something that would be suggested on failure.

<!-- gh-comment-id:968351056 --> @hexmode commented on GitHub (Nov 14, 2021): This is my fault. I did not set GITHUB_TOKEN. This suggests that "MAKE SURE YOUR **GITHUB_TOKEN** IS SET IF YOU ARE TRYING TO USE ACTIONS THAT REQUIRE IT" should be a more visible message in the documentation and displayed on failure for a possible fix to the failure. `GITHUB_TOKEN` was in the environment, but it was empty. [When it is set in the environment](https://github.com/nektos/act/blob/11f6ee37a660be806cdb89d9a217d7093ddb30b4/pkg/runner/run_context.go#L717) is a good time to highlight that it is not available. Looking around for how GITHUB_TOKEN is set, I saw the documentation I found [a brief reference in the README](https://github.com/nektos/act/blob/11f6ee37a660be806cdb89d9a217d7093ddb30b4/README.md?plain=1#L196). Since the token is used for various Github services and this tool is meant to "Run your GitHub Actions locally", that would suggest that this should be more clearly spelled out. I've updated the issue title so that it this (suggesting setting the GITHUB_TOKEN secret) is something that would be suggested on failure.
Author
Owner

@catthehacker commented on GitHub (Nov 14, 2021):

[CI/run_tests]   ❗  ::error::Input required and not supplied: token
DEBU[0001] exit with `FAILURE`: 1                       
[CI/run_tests]   ❌  Failure - actions/checkout@v2
DEBU[0001] exit with `FAILURE`: 1                       
Error: exit with `FAILURE`: 1
<!-- gh-comment-id:968354492 --> @catthehacker commented on GitHub (Nov 14, 2021): ``` [CI/run_tests] ❗ ::error::Input required and not supplied: token DEBU[0001] exit with `FAILURE`: 1 [CI/run_tests] ❌ Failure - actions/checkout@v2 DEBU[0001] exit with `FAILURE`: 1 Error: exit with `FAILURE`: 1 ```
Author
Owner

@hexmode commented on GitHub (Nov 14, 2021):

I agree that is there. My point is that more could be done to help idiots like myself.

<!-- gh-comment-id:968362185 --> @hexmode commented on GitHub (Nov 14, 2021): I agree that is there. My point is that more could be done to help idiots like myself.
Author
Owner

@hexmode commented on GitHub (Nov 14, 2021):

This is especially true since the secret is set automatically when running on Github itself.

<!-- gh-comment-id:968362481 --> @hexmode commented on GitHub (Nov 14, 2021): This is especially true since the secret is set automatically when running on Github itself.
Author
Owner

@catthehacker commented on GitHub (Nov 15, 2021):

If you have any suggestion towards improving documentation, please share.
As for the error in CLI, I'm rather against adding any messages for such specific issues since it can confuse more than help.

<!-- gh-comment-id:968661435 --> @catthehacker commented on GitHub (Nov 15, 2021): If you have any suggestion towards improving documentation, please share. As for the error in CLI, I'm rather against adding any messages for such specific issues since it can confuse more than help.
Author
Owner

@github-actions[bot] commented on GitHub (Dec 16, 2021):

Issue is stale and will be closed in 14 days unless there is new activity

<!-- gh-comment-id:995313240 --> @github-actions[bot] commented on GitHub (Dec 16, 2021): Issue is stale and will be closed in 14 days unless there is new activity
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#526
No description provided.