-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
Latest v2 broke all of my private github actions #283
Comments
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. |
I got the same problem.
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 // Determine the default branch
if (!settings.ref && !settings.commit) {
core.startGroup('Determining the default branch')
settings.ref = await githubApiHelper.getDefaultBranch(
settings.authToken,
settings.repositoryOwner,
settings.repositoryName
)
core.endGroup()
}
:
:
:
const authHelper = gitAuthHelper.createAuthHelper(git, settings)
try {
// Configure auth
core.startGroup('Setting up auth')
await authHelper.configureAuth()
core.endGroup() |
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
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? |
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. |
Sorry about the disruption. I just pushed an update to v2 which contains the fix. Let me know if everything is working again. |
@phiresky thanks for the |
verified that v2.3.1 works for my repos that are using ssh-key w/o a token. Thanks! |
Works fine for my repos. Thank you. |
I'm hoping that the future changes shouldn't break the legacy. With multiple of repo, to update them is tedious. |
Goal is to make CI scripts work with a default branch of main or master. notes: `git symbolic-ref refs/remotes/origin/HEAD` worked locally but not on GitHub actions. references: - actions/checkout#283 (comment) - https://github.com/thoughtbot/dotfiles/blob/2a59c1890f81bffc1db79cae4482ce2b706b0f79/bin/git-up - https://github.com/actions/checkout/pull/284/files - jhauberg/gitdoctor#3 (comment)
After the release this morning, all of my github actions using checkout to pull a private action started failing.
I would like to request that you revert the change that is now breaking hundreds of my private workflows.
The text was updated successfully, but these errors were encountered: