Repository navigation
"Error: Error: Could not read from remote repository." with @v9 #450
Description
Activity
- addedstatus: pendingMore info is needed before deciding what to doMore info is needed before deciding what to do
on Oct 31, 2022 The info in this logs is not sufficient to determine the cause of the issue
Would you be able to provide some context on the previous steps?The info in this logs is not sufficient to determine the cause of the issue Would you be able to provide some context on the previous steps?
Sure! In fact, there are no tricky things in my workflow - I run checkout, build, copy a few files into the local repo, and want to update them into the remote repo.
- name: Checkout Sources uses: actions/checkout@v3 with: lfs: true fetch-depth: '0' submodules: 'true' token: ${{ secrets.CI_TOKEN }}@vitalyk-multinarity What happens if you remove
fetch-depthfrom theactions/checkoutinputs? There are some users that reported weird behavior while using that argument.- @EndBug - unfortunately that didn't help. There is no "couldn't read from remote repo" error, but instead of this I'm getting "fatal: remote error: upload-pack: not our ref xxxxxxx" for one of submodules
- When I tried to replace add-and-commit with a plain shell, that works as follows:
git config --global user.email "ci@example.com" git config --global user.name "CI GitHub" git add Assets/........./libs/ git commit -m "CI: Updating control-*.aar [skip ci]" git pushI think I figured it out ahahha
You've setpulltoNO-PULL, while you should have just not used it. It can't pull because your repo has no "NO-PULL" ref!I think that if you try using this it'll work:
- name: Update plugins uses: EndBug/add-and-commit@v9 with: add: 'my_path' message: 'CI: Updating control-*.aar [skip ci]'
- added 2 commits that reference this issue
on Nov 7, 2022 Many thanks, it works!
Either I misunderstood the Readme, or it's not updated:Arguments for the git pull command. By default, the action does not pull
I do want pull before add&push, because my workflow should commit twice (two separate components). So I tried to use 'pull:true' and, after getting errors, modified it to 'NO-PULL', probably according to an outdated doc.
NO-PULLwas an option in the past, but it has been removed in v8.0.0
Happy to hear that everything works! I'll close the issue for nowReacted by vitalyk-multinaritySo if I understand properly, by default your action v9 does pull?
No, the action does not pull by default.
I don't want to be a 'nudnik', but in this case, I don't understand how my workflow works.
I do the following:- checkout
- update dir1/module1
- update dir2/module2
- use add-and-commit with 'add:dir1'
- use add-and-commit with 'add:dir2'
IMHO, #5 cannot work without pull...
Don't worry ahahaha
It can work because the history is not reset when the action runs. As long as you don't push anything right after the first commit, the second will always be a fast-forward push.
This is the same behavior as if you were to use:git commit git push git commit git push
Reacted by vitalyk-multinarityOf course, you're right - this is really trivial scenario.
Thank you for your patience and shame on me!- No problem 😅…On Mon, Nov 7, 2022, 10:34 vitalyk-multinarity ***@***.***> wrote: Of course, you're right - this is really trivial scenario. Thank you for your patience and shame on me! — Reply to this email directly, view it on GitHub <#450 (comment)>, or unsubscribe <https://github.com/notifications/unsubscribe-auth/AGJJ6XQD6DI4Z2BVHJLUNELWHDELNANCNFSM6AAAAAARTEALU4> . You are receiving this because you modified the open/close state.Message ID: ***@***.***>
Describe the bug
"Error: Error: Could not read from remote repository" error using @v9
The same flow works with v7.5.0
Note: with checkout@v3 I'm using PAT instead of default token.
Similar to #199
Workflow used
Expected behavior
git add / git commit / git push
Logs
Either provide a link to the action run or (if your repo is private) paste here the logs from the step that uses it. If you paste the logs, please use this template, and remember to paste the logs from all the different sections.
Logs