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

Dry run should not request github token #10441

Closed
strowk opened this issue Jun 15, 2021 · 9 comments
Closed

Dry run should not request github token #10441

strowk opened this issue Jun 15, 2021 · 9 comments
Labels
priority-3-medium Default priority, "should be done" but isn't prioritised ahead of others type:bug Bug fix of existing functionality

Comments

@strowk
Copy link
Contributor

strowk commented Jun 15, 2021

How are you running Renovate?

  • [+ ] Self hosted

Please select which platform you are using:

Just running on my machine locally

Renovate version: 25.41.4

Describe the bug

When I run renovate --dry-run to define what would be the actions tool would take, I receive error

You must configure a GitHub personal access token

There should not be a need for access token in dry run, since dry run mode is not supposed to make any authorized calls.

@strowk strowk added priority-5-triage status:requirements Full requirements are not yet known, so implementation should not be started type:bug Bug fix of existing functionality labels Jun 15, 2021
@rarkins
Copy link
Collaborator

rarkins commented Jun 15, 2021

More generally: we might need a token if it's private but it does not need to be a write-enabled token.

@rarkins rarkins added status:ready priority-3-medium Default priority, "should be done" but isn't prioritised ahead of others and removed status:requirements Full requirements are not yet known, so implementation should not be started priority-5-triage labels Jun 15, 2021
@zharinov zharinov self-assigned this Jun 21, 2021
@rarkins
Copy link
Collaborator

rarkins commented Sep 11, 2021

Unfortunately GitHub's GraphQL isn't allowed unless you're authenticated, even for read-only data of a public repo. It errors with:

         "response": {
           "statusCode": 401,
           "statusMessage": "Unauthorized",
           "body": {
             "message": "This endpoint requires you to be authenticated.",
             "documentation_url": "https://docs.github.com/graphql/guides/forming-calls-with-graphql#authenticating-with-graphql"
           },

Therefore closing this as it's not possible.

@rarkins rarkins closed this as completed Sep 11, 2021
@strowk
Copy link
Contributor Author

strowk commented Sep 11, 2021

I am not using Github from renovate in any capacity with or without dry-run. Our code is stored on private Bitbucket. Why does renovate have to ask anything from Github at all?
Dry run supposed only run analysis of dependencies and give result in a terminal without contacting any remote git repositories/storages IMO.

I think this ticket is closed wrongly without enough investigation. @rarkins , please reopen

@rarkins
Copy link
Collaborator

rarkins commented Sep 11, 2021

It's the same APIs and same limitation regardless of GitHub.com or self hosted.

@strowk
Copy link
Contributor Author

strowk commented Sep 11, 2021

Why API is needed in the first place? I think dry-run could do without it.

@strowk
Copy link
Contributor Author

strowk commented Sep 11, 2021

Specifically I do not understand why tool is trying to connect to Github in the first place.

Our code is not connected to Github. There is literally nothing that connects it to Github and no infromation that could be retrieved from there regarding it.
Code is stored in Bitbucket, dependencies are in NPM. On the dry-run I expect it to not require even Bitbucket, but why is it calling Github is a complete mystery.

@rarkins
Copy link
Collaborator

rarkins commented Sep 11, 2021

If you run renovate --dry-run then it will default to GitHub.com.

You wrote earlier:

Please select which platform you are using:

Just running on my machine locally

You wrote just now:

I expect it to not require even Bitbucket

You misunderstand how Renovate works. There is no concept of running locally and I should have asked you to be more specific originally when you provided an invalid answer to that question.

Finally, my previous comment of "regardless of GitHub.com or self hosted" was based on your original post where you said you are running GitHub not Bitbucket, before you edited it:

image

This issue is closed, especially because it was based on a misunderstanding of Renovate to begin with.

@strowk
Copy link
Contributor Author

strowk commented Sep 11, 2021

You still did not explain why API is needed when dry-run is selected. I believe it should not be required, but you evade that question. Would you be so kind to answer?

@rarkins
Copy link
Collaborator

rarkins commented Sep 12, 2021

I directly answered you that "there is no concept of running locally". Renovate always runs against an API, it does not run against local files. There is a feature request #3609 open for this capability.

@renovatebot renovatebot locked as resolved and limited conversation to collaborators Sep 12, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
priority-3-medium Default priority, "should be done" but isn't prioritised ahead of others type:bug Bug fix of existing functionality
Projects
None yet
Development

No branches or pull requests

3 participants