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

Execute authenticate git command in the next step after @actions/checkout #194

Closed
fmontada opened this issue Mar 21, 2020 · 6 comments
Closed

Comments

@fmontada
Copy link

fmontada commented Mar 21, 2020

Hi team
As part of our CI/CD workflow we are using Lerna to handle our Javascript mono repo

So we build, test, deploy and tag/release every-time something get merge to master

Our question is using @actions/checkout@v2 it is posible to do not delete the Github token in order for us execute git authenticated commands for the tag/release ?

Cleaning the token make sense but could be great if there is a way to add a toggle for the cleanup in case the workflow need to execute git authenticate commands after the git checkout

58070a9

- uses: actions/checkout@v2
  with:
    token: {{OUR_TOKEN_WITH_GIT_TAG_PERMISION}}
@jsg2021
Copy link

jsg2021 commented Mar 22, 2020

Same as my issue. #166

@ericsciple
Copy link
Contributor

@fmontada the input persist-credentials controls whether the token is persisted in the local git config. Does that help?

@gmazzo
Copy link

gmazzo commented Apr 15, 2020

The doc states that persist-credentials is enabled by default. Is that accurate?

Because in the source code I'm seeing the opposite:
https://github.com/actions/checkout/blob/v2/src/input-helper.ts#L123

And I'm getting this when running a git push inside a Gradle task:

fatal: could not read Username for 'https://***.com': Device not configured

@ericsciple
Copy link
Contributor

@gmazzo are you using actions/checkout@v2 or a different version?

@gmazzo
Copy link

gmazzo commented Apr 15, 2020

Yes, I have it like this:

      - name: Checkout
        uses: actions/checkout@v2
        with:
          token: ${{ secrets.GPR_TOKEN }}

But, I just wanted to double-check, because if my understanding of the source code is that it's false by default, not true as the documentation states...

EDIT: reading this other thread #166 (comment), I've just realized the issue. It's a local config, not global one. That will explain why cloning from a third-party tool is not working. Thanks!

@ericsciple
Copy link
Contributor

The default is true. The runner applies the default from the action yaml

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

4 participants