question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

matrix execution fails due to "remote contains work that you do not have locally"

See original GitHub issue

Hi, 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:closed
  • Created 2 years ago
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
francesco-ballarincommented, May 7, 2021

Thanks @peaceiris, I’ll change my workflow to use artifacts!

0reactions
github-actions[bot]commented, Aug 10, 2021

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>
Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found