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

Can not install gitleaks for selfhosted runner (Destination file path /tmp/gitleaks.tmp already exists) #127

Open
sydseter opened this issue Oct 31, 2023 · 2 comments · May be fixed by #138

Comments

@sydseter
Copy link

sydseter commented Oct 31, 2023

I understand this is meant to be used with docker, but perhaps it would be an idea to try to remove gitleaks.tmp from tmp before or after download and extraction?

For our self-hosted runner we fixed this by removing /tmp/gitleaks.tmp before running gitleaks-action

e.g:

  - name: Remove gitleaks from tmp if it exist
    run: rm -f /tmp/gitleaks.tmp || echo "gitleaks.tmp has already been removed."
gitleaks version: 8.18.0
Version to install: 8.18.0 (target directory: /tmp/gitleaks-8.18.0)
Downloading gitleaks from https://github.com/zricethezav/gitleaks/releases/download/v8.18.0/gitleaks_8.18.0_linux_x64.tar.gz
Destination file path /tmp/gitleaks.tmp already exists
Waiting 19 seconds before trying again
Destination file path /tmp/gitleaks.tmp already exists
Waiting 17 seconds before trying again
Error: could not install gitleaks from https://github.com/zricethezav/gitleaks/releases/download/v8.18.0/gitleaks_8.18.0_linux_x64.tar.gz, error: Error: Destination file path /tmp/gitleaks.tmp already exists
/actions-runner/_work/_actions/AdmincontrolAS/gitleaks-action/v2/dist/index.js:86[12](https://github.com/AdmincontrolAS/unicorn/actions/runs/6705241157/job/18219262014?pr=8355#step:3:13)
            throw new Error("parameter 'file' is required");
                  ^

Error: parameter 'file' is required
    at Object.<anonymous> (/actions-runner/_work/_actions/AdmincontrolAS/gitleaks-action/v2/dist/index.js:8612:19)
    at Generator.next (<anonymous>)
    at /actions-runner/_work/_actions/AdmincontrolAS/gitleaks-action/v2/dist/index.js:8411:71
    at new Promise (<anonymous>)
    at __webpack_modules__.7784.__awaiter (/actions-runner/_work/_actions/AdmincontrolAS/gitleaks-action/v2/dist/index.js:8407:12)
    at Object.extractTar (/actions-runner/_work/_actions/AdmincontrolAS/gitleaks-action/v2/dist/index.js:8610:12)
    at Object.Install (/actions-runner/_work/_actions/AdmincontrolAS/gitleaks-action/v2/dist/index.js:70516:16)
    at async start (/actions-runner/_work/_actions/AdmincontrolAS/gitleaks-action/v2/dist/index.js:7[13](https://github.com/AdmincontrolAS/unicorn/actions/runs/6705241157/job/18219262014?pr=8355#step:3:14)42:[22](https://github.com/AdmincontrolAS/unicorn/actions/runs/6705241157/job/18219262014?pr=8355#step:3:23))
@simonjur
Copy link

simonjur commented Feb 6, 2024

any progress on this pls?

@simonjur simonjur linked a pull request Feb 13, 2024 that will close this issue
@soulseekah
Copy link

Seems that this fixes it #138

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants