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

git pull error #46

Closed
ianwalter opened this issue Jul 11, 2020 · 4 comments
Closed

git pull error #46

ianwalter opened this issue Jul 11, 2020 · 4 comments

Comments

@ianwalter
Copy link

I'm getting this error when the action runs:

 /usr/local/bin/pnpx changeset publish
🦋  info npm info @ianwalter/monorepo-app
🦋  info npm info @ianwalter/monorepo-hello
🦋  info npm info @ianwalter/monorepo-log
🦋  warn @ianwalter/monorepo-app is not being published because version 1.0.0 is already published on npm
🦋  warn @ianwalter/monorepo-hello is not being published because version 1.0.0 is already published on npm
🦋  warn @ianwalter/monorepo-log is not being published because version 1.1.0 is already published on npm
🦋  warn No unpublished packages to publish
/usr/bin/git pull origin master
fatal: Not a git repository (or any parent up to mount point /__w)
Stopping at filesystem boundary (GIT_DISCOVERY_ACROSS_FILESYSTEM not set).
Error: The process '/usr/bin/git' failed with exit code 128
##[error]The process '/usr/bin/git' failed with exit code 128
    at a._setResult (/__w/_actions/changesets/action/master/dist/index.js:86:6638)
    at a.CheckComplete (/__w/_actions/changesets/action/master/dist/index.js:86:6068)
    at ChildProcess.<anonymous> (/__w/_actions/changesets/action/master/dist/index.js:86:5102)
    at ChildProcess.emit (events.js:210:5)
    at maybeClose (internal/child_process.js:1021:16)
    at Socket.<anonymous> (internal/child_process.js:430:11)
    at Socket.emit (events.js:210:5)
    at Pipe.<anonymous> (net.js:659:12)

You can see the entire log (and repo) here: https://github.com/ianwalter/monorepo-example/runs/860303546?check_suite_focus=true

I think the git commands shouldn't run in runPublish if changesetPublishOutput doesn't have a new tag ?

@Andarist
Copy link
Member

Well, we could move those lines further down:

action/src/run.ts

Lines 81 to 82 in bfeb9e0

await gitUtils.pullBranch(branch);
await gitUtils.push(branch, { includeTags: true });

but then you would encounter the problem when publishing packages, wouldn't you?

Do you have any guesses on why this fails for you? It looks quite bizarre - you are cloning a repository as the very first step of your workflow, so how git repository could not be found? 🤔

@ianwalter
Copy link
Author

ianwalter commented Jul 11, 2020

True. Only difference I can think of from the the example is that its running in a container and not directly on the vm and it's using Node 14.5 instead of LTS. I'll try printing the CWD and debugging later today.

@ianwalter
Copy link
Author

It was because I was using the node:14.5 that uses Debian Stretch which has git < 2.18 and so the checkout action uses the GitHub API instead of git for whatever reason. I switched to node:14.5-buster and it worked, thanks!

@bbedward
Copy link

bbedward commented Apr 7, 2022

I came across the same thing, as an alternative if you need a stretch image you can do:

# Add stretch-backports for newer git 
RUN echo "deb http://deb.debian.org/debian stretch-backports main" >> /etc/apt/sources.list
RUN apt-get update && apt-get install -y -t stretch-backports git && \
         apt-get clean all && \
         rm -rf /var/lib/apt/lists/*

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants