You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Latest v2 broke all of my private github actions #283
I got the same problem.
"Determining the default branch" fails using ssh-key.
Determining the default branch
Retrieving the default branch name
Not Found
Waiting 12 seconds before trying again
Retrieving the default branch name
Not Found
Waiting 12 seconds before trying again
Retrieving the default branch name
##[error]Not Found
I guess checking the default branch before setting up auth.
Same here. This is breaking all of our test runs since they fetch info from a different repo than the tested one. Pretty sure this is caused by #278@ericsciple
Using the repo token is not a valid solution in general since it doesn't work for ssh keys that are passed via secrets that are not part of the normal TOKEN.
For some reason in that PR it was decided to use the proprietary Github API instead of the standard git api to determine the default branch, which means this also shouldn't work for repos from any other provider other than github.
The standard git api for determining the default branch is fetching the HEAD ref from the remote. If the repo is already synchronized, this is just git symbolic-ref refs/remotes/origin/HEAD. Otherwise, it can be fetched by either:
git remote show https://github.com/actions/checkout | grep 'HEAD branch' human readable, only works within a git repo
git ls-remote --exit-code --symref https://github.com/actions/checkout HEAD works from anywhere, independent of the surrounding repository, machine readable output (i guess)
Also, instead of just failing completely when default branch cannot be determined (might be possible to configure a repo to not have one?) it should probably still fall back to master to be compatible with previous behaviour?
Reacted by Henning Dieterichs, eric sciple, Jack Tomaszewski and Daniel Himmelstein
Activity
drwoods commentedon Jun 17, 2020
Same here. We had to update several repos (with many more to come) to use the token instead -
The v2.3.0 release needs to be reverted and released as a breaking v3 release if token needs to be a required/valid parameter.
mizumotok commentedon Jun 18, 2020
I got the same problem.
"Determining the default branch" fails using ssh-key.
I guess checking the default branch before setting up auth.
https://github.com/actions/checkout/blob/v2.3.0/src/git-source-provider.ts#L22
phiresky commentedon Jun 18, 2020
Same here. This is breaking all of our test runs since they fetch info from a different repo than the tested one. Pretty sure this is caused by #278 @ericsciple
Using the repo token is not a valid solution in general since it doesn't work for ssh keys that are passed via secrets that are not part of the normal TOKEN.
For some reason in that PR it was decided to use the proprietary Github API instead of the standard git api to determine the default branch, which means this also shouldn't work for repos from any other provider other than github.
The standard git api for determining the default branch is fetching the HEAD ref from the remote. If the repo is already synchronized, this is just
git symbolic-ref refs/remotes/origin/HEAD. Otherwise, it can be fetched by either:git remote show https://github.com/actions/checkout | grep 'HEAD branch'human readable, only works within a git repogit ls-remote --exit-code --symref https://github.com/actions/checkout HEADworks from anywhere, independent of the surrounding repository, machine readable output (i guess)Also, instead of just failing completely when default branch cannot be determined (might be possible to configure a repo to not have one?) it should probably still fall back to master to be compatible with previous behaviour?
viernullvier commentedon Jun 18, 2020
We've been running into the same error message as @mizumotok - the default branch selection logic still seems to have some major issues.
Our configuration:
For the time being, setting the ref explicitly fixed the issue for us:
I agree with @drwoods - it seems like v2.3 introduced some breaking changes, so it should have been a v3 release instead.
ericsciple commentedon Jun 18, 2020
Sorry about the disruption.
I just pushed an update to v2 which contains the fix. Let me know if everything is working again.
ericsciple commentedon Jun 18, 2020
@phiresky thanks for the
git ls-remotesuggestion!drwoods commentedon Jun 18, 2020
verified that v2.3.1 works for my repos that are using ssh-key w/o a token. Thanks!
mizumotok commentedon Jun 19, 2020
Works fine for my repos. Thank you.
faizalzakaria commentedon Jul 29, 2020
I'm hoping that the future changes shouldn't break the legacy. With multiple of repo, to update them is tedious.
Modify CI to allow for main default branch