Repository navigation
Closed
Labels
status: pendingMore info is needed before deciding what to do
Description
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
- name: Update plugins
uses: EndBug/add-and-commit@v9
with:
add: 'my_path'
message: 'CI: Updating control-*.aar [skip ci]'
pull: 'NO-PULL'
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
Run EndBug/add-and-commit@v9
with:
add: my-peth
message: CI: Updating control*.aar [skip ci]
pull: NO-PULL
cwd: .
default_author: github_actor
fetch: --tags --force
pathspec_error_handling: ignore
push: true
github_token: ***
env:
JAVA_HOME: /opt/hostedtoolcache/Java_Zulu_jdk/8.0.35[2](https://github.com/multinarity/SpaceTop-Unity/actions/runs/3361537012/jobs/5572055054#step:12:2)-8/x64
JAVA_HOME_8_X64: /opt/hostedtoolcache/Java_Zulu_jdk/8.0.[3](https://github.com/multinarity/SpaceTop-Unity/actions/runs/3361537012/jobs/5572055054#step:12:3)52-8/x6[4](https://github.com/multinarity/SpaceTop-Unity/actions/runs/3361537012/jobs/5572055054#step:12:4)
Running in /home/runner/work/my-repo/my-repo
Add input parsed as single string, running 1 git add command.
> Using 'vitalyk' as author.
> Using "CI: Updating control-*.aar [skip ci]" as commit message.
Internal logs
> Staging files...
> Adding files...
> No files to remove.
> Checking for uncommitted changes in the git working tree...
> Found 2 changed files.
> Fetching repo...
{ raw: '', remote: null, branches: [], tags: [] }
> Pulling from remote...
{ raw: '', remote: null, branches: [], tags: [] }
Error: Error: Could not read from remote repository.
Outputs
committed: false
commit_long_sha: undefined
commit_sha: undefined
pushed: false
tagged: false
tag_pushed: false
Error: Error: Could not read from remote repository.Metadata
Metadata
Assignees
Labels
status: pendingMore info is needed before deciding what to do
Activity
EndBug commentedon 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?
vitalyk-multinarity commentedon Nov 1, 2022
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.
EndBug commentedon Nov 5, 2022
@vitalyk-multinarity What happens if you remove
fetch-depthfrom theactions/checkoutinputs? There are some users that reported weird behavior while using that argument.vitalyk-multinarity commentedon Nov 6, 2022
EndBug commentedon Nov 6, 2022
I think I figured it out ahahha
You've set
pulltoNO-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:
fix(io): add warning for pull input
fix(io): add warning for pull input (#453)
vitalyk-multinarity commentedon Nov 7, 2022
Many thanks, it works!
Either I misunderstood the Readme, or it's not updated:
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.
EndBug commentedon Nov 7, 2022
NO-PULLwas an option in the past, but it has been removed in v8.0.0Happy to hear that everything works! I'll close the issue for now
vitalyk-multinarity commentedon Nov 7, 2022
So if I understand properly, by default your action v9 does pull?
EndBug commentedon Nov 7, 2022
No, the action does not pull by default.
vitalyk-multinarity commentedon Nov 7, 2022
I don't want to be a 'nudnik', but in this case, I don't understand how my workflow works.
I do the following:
IMHO, #5 cannot work without pull...
EndBug commentedon Nov 7, 2022
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:
vitalyk-multinarity commentedon Nov 7, 2022
Of course, you're right - this is really trivial scenario.
Thank you for your patience and shame on me!
EndBug commentedon Nov 7, 2022