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

! [remote rejected] main -> main (cannot lock ref 'refs/heads/main': #250

Open
ianlewis opened this issue Jul 31, 2023 · 2 comments
Open
Labels
bug Something isn't working

Comments

@ianlewis
Copy link
Member

Most of the e2e test workflows commit and push a change and if two workflows do this at the same time the remove will reject the change because it's non-linear.

Cloning into 'example-package'...
/home/runner/work/example-package/example-package/example-package
[main 431364b7] .github/workflows/e2e.nodejs.tag.main.unscoped.slsa3.yml
 2 files changed, 3 insertions(+), 3 deletions(-)
To https://github.com/slsa-framework/example-package.git
 ! [remote rejected]   main -> main (cannot lock ref 'refs/heads/main': is at 66[9](https://github.com/slsa-framework/example-package/actions/runs/5698916646/job/15447297517#step:3:10)41e6196d60ec8a5f14cc3cd5764037bad4e82 but expected cdec69331ca3b4565378c23c6f917d5f89426a3a)
error: failed to push some refs to 'https://github.com/slsa-framework/example-package.git'
@ianlewis ianlewis added the bug Something isn't working label Jul 31, 2023
@ianlewis
Copy link
Member Author

Another error with the same cause

error: failed to push some refs to 'https://github.com/slsa-framework/example-package.git'
hint: Updates were rejected because the remote contains work that you do
hint: not have locally. This is usually caused by another repository pushing
hint: to the same ref. You may want to first integrate the remote changes
hint: (e.g., 'git pull ...') before pushing again.
hint: See the 'Note about fast-forwards' in 'git push --help' for details.

@ianlewis
Copy link
Member Author

Maybe the bootstrap script can retry a number of times?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant