Comments (3)
I am also seeing this and we are also using non standard tags. I just tried a workaround that I thought would work but it didn't and failed during the actions/checkout
call:
- name: Checkout
uses: 'actions/checkout@v4'
with:
fetch-depth: 0
ref: develop
- name: Switch to tag
run: |
git fetch --all --tags
git checkout -b customTag [tag]
This is the error I am getting:
/opt/homebrew/bin/git -c protocol.version=2 fetch --prune --no-recurse-submodules origin +refs/heads/*:refs/remotes/origin/* +refs/tags/*:refs/tags/*
remote: Repository not found.
Error: fatal: repository 'https://github.com/xxxx/xxxx/' not found
The process '/opt/homebrew/bin/git' failed with exit code 128
Waiting 11 seconds before trying again
/opt/homebrew/bin/git -c protocol.version=2 fetch --prune --no-recurse-submodules origin +refs/heads/*:refs/remotes/origin/* +refs/tags/*:refs/tags/*
remote: Repository not found.
Error: fatal: repository 'https://github.com/xxxx/xxxx/' not found
Error: The process '/opt/homebrew/bin/git' failed with exit code 128
from checkout.
Can you provide an example workflow of how you were successfully checking out non-standard refs?
from checkout.
Sure, here is a minimal example that demonstrates the breakage introduced with 4.1.7 (breakage in a sense regardless of whether or not this ever was officially supported)
https://github.com/oxc/actions-checkout-issue-1782/actions/workflows/demo.yaml
https://github.com/oxc/actions-checkout-issue-1782/blob/main/.github/workflows/demo.yaml
name: Demo for non-standard ref names issue
on:
workflow_dispatch:
jobs:
push_ref:
name: Create non-standard ref name
runs-on: ubuntu-latest
outputs:
ref: ${{ steps.push.outputs.ref }}
permissions:
contents: write
steps:
- name: Checkout repo
uses: actions/checkout@v4
- name: Create dummy commit, and push as non-standard ref
id: push
run: |
git config user.name 'github-actions[bot]'
git config user.email '41898282+github-actions[bot]@users.noreply.github.com'
echo "Dummy" > dummy
git add dummy
git commit -m 'Dummy commit (run id ${{ github.run_id }})'
git push origin HEAD:$REF
echo "ref=$REF" >> "$GITHUB_OUTPUT"
env:
REF: "refs/deploy-bot/${{ github.run_id }}/merge"
checkout_old_working:
name: Checkout non-standard ref name (working @4.1.6)
runs-on: ubuntu-latest
needs: push_ref
steps:
- name: Checkout repo
uses: actions/[email protected]
with:
ref: ${{ needs.push_ref.outputs.ref }}
- name: Show latest commit
run: |
git log -1
cat dummy
checkout_new_failing:
name: Checkout non-standard ref name (failing @ > 4.1.6)
runs-on: ubuntu-latest
needs: push_ref
steps:
- name: Checkout repo
uses: actions/checkout@v4
with:
ref: ${{ needs.push_ref.outputs.ref }}
- name: Show latest commit
run: |
git log -1
cat dummy
from checkout.
Related Issues (20)
- Unable to clone my other private repo's which i own from my private repository in github actions workflow
- Lack of support for GITHUB_SERVER_URL with subpath
- Infinite loop when git push
- PAT based access to different account not working in github actions
- inadequate documentation on "filter" option
- Error relocating /__e/node20_alpine/bin/node: secure_getenv: symbol not found HOT 1
- Заблокировать перевод по номеру телефона. Сбербанк
- 'actions/checkout@v4' with LFS fails because of double auth header HOT 1
- New
- 2 segunda
- Support LFS include/exclude HOT 1
- checkout fails when called from reusable workflows HOT 2
- https://github.com/actions/checkout/issues/new
- actions/checkout fails on git repos that use SHA256 HOT 1
- Exit code 128 (repository not found) eventhough the repo exists. HOT 1
- V4 hangs from time to time on fetching repository on GitHub ARC
- Not always working on private repos HOT 1
- Validador
- Checkout v4 Fails On Windows Server 2019 HOT 2
- Feature Request: Retry on network errors
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from checkout.