matrix execution fails due to "remote contains work that you do not have locally"
See original GitHub issueHi, I have a workflow with a matrix strategy, composed of four different cases which run in parallel.
I am randomly getting errors
Push the commit or tag
/usr/bin/git push origin gh-pages
To https://github.com/FEMlium/femlium.github.io.git
! [rejected] gh-pages -> gh-pages (fetch first)
error: failed to push some refs to '***github.com/FEMlium/femlium.github.io.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.
Error: Action failed with "The process '/usr/bin/git' failed with exit code 1"
(e.g. in https://github.com/FEMlium/FEMlium/runs/2519718493?check_suite_focus=true)
I guess this happens when two jobs are trying to push to the repository at almost the same time. Is there a way to force the action to do a git fetch before it tries to do a git push?
My error is quite close to #104, but I think my workflow is different than the one reported there. The one reported there was having a multi-execution of the action in the same workflow; instead I have a single execution of the action in parallel workflows.
Thanks!
Issue Analytics
- State:
- Created 2 years ago
- Comments:5 (3 by maintainers)
Top Results From Across the Web
Updates were rejected because the remote contains work that ...
This usually happens when the repo contains some items that are not there locally. So in order to push our changes ...
Read more >How to Fix the Remote 'updates were rejected' Git Error
The Git error “updates were rejected because the remote contains work that you do not have locally” is triggered when we initialize a...
Read more >linkedin-skill-assessments-quizzes/git-quiz.md at main - GitHub
What command lets you create a connection between a local and remote repository? git remote add new ... Bare repos do not have...
Read more >When I `git push` to an empty repo, I get an error - Reddit
When I execute a git push origin master I encounter an error saying the remote contains work that I do not have locally....
Read more >Solution to Updates were rejected because the remote ...
its because you don't have the changes made by your friend updated in your ... because the remote contains work that you do...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Thanks @peaceiris, I’ll change my workflow to use artifacts!
This issue has been LOCKED because of it being resolved!
The issue has been fixed and is therefore considered resolved. If you still encounter this or it has changed, open a new issue instead of responding to solved ones.
<div align="right">Log | Bot Usage</div>