cache
cache copied to clipboard
Warning: Failed to restore: downloadCache failed: unable to verify the first certificate
Dear team, I apologise if I'm in the wrong place. Couldn't find any relevant link.
Trying to use actions/cache@3 or actions/cache/restore@v3 got this message:
The cache was saved with a separate workflow and on the place.
GitHub Enterprise Server 3.8.8
Runs-on: self-hosted
Might it be a runner settings issue related? Could you please give me a hint on how to resolve this? Thanks in advance. Regards, Denis.
: cleanup caches by a branch on: pull_request: types: - closed
jobs:
cleanup:
runs-on: ubuntu-latest
steps:
- name: Cleanup
run: |
gh extension install actions/gh-actions-cache
echo "Fetching list of cache key"
cacheKeysForPR=$(gh actions-cache list -R $REPO -B $BRANCH -L 100 | cut -f 1 )
## Setting this to not fail the workflow while deleting cache keys.
set +e
echo "Deleting caches..."
for cacheKey in $cacheKeysForPR
do
gh actions-cache delete $cacheKey -R $REPO -B $BRANCH --confirm
done
echo "Done"
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
REPO: ${{ github.repository }}
BRANCH: refs/pull/${{ github.event.pull_request.number }}/merge
: cleanup caches by a branch on: pull_request: types: - closed
jobs:
cleanup:
runs-on: ubuntu-latest
steps:
- name: Cleanup
run: |
gh extension install actions/gh-actions-cache
echo "Fetching list of cache key"
cacheKeysForPR=$(gh actions-cache list -R $REPO -B $BRANCH -L 100 | cut -f 1 )
## Setting this to not fail the workflow while deleting cache keys.
set +e
echo "Deleting caches..."
for cacheKey in $cacheKeysForPR
do
gh actions-cache delete $cacheKey -R $REPO -B $BRANCH --confirm
done
echo "Done"
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
REPO: ${{ github.repository }}
BRANCH: refs/pull/${{ github.event.pull_request.number }}/merge
Hello @poiupoiu17990 as far as I understood this extension doesn't allow to use of a cache, only to list or delete. The question was how to use it.
BTW, for a GHES it requires GH_ENTERPRISE_TOKEN and GH_HOST definition instead of GH_TOKEN.
env:
GH_ENTERPRISE_TOKEN: ${{ github.token }}
GH_HOST: 'git.custom-host.com'
run: |
gh extension install https://github.com/actions/gh-actions-cache
gh actions-cache list
@agepalmist Did you ever find a solution?
Setting the environment variable NODE_EXTRA_CA_CERTS
to /etc/ssl/certs/ca-certificates.crt
(ubuntu) solved the issue for me.