question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Github token should not be a warning if repo does not have a github remote

See original GitHub issue

When running lhci, it’s showing a warning:

⚠️ Github token set

A GitHub token is not required to run my code locally and upload to temporary-public-storage. I’m not using a GH action.

Config seems to come from here:

https://github.com/GoogleChrome/lighthouse-ci/blob/c588086e3899b5714e9d7d735381b1143bd12bc2/packages/cli/src/healthcheck/healthcheck.js#L55-L60

I’m not sure the right way to set it up related to people using it through GH action, but I know it shouldn’t be set to run for everybody running the upload task.

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:6 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
patrickhulcecommented, Nov 15, 2019

Thanks for filing @calvinf! This is WAI, that’s why it’s a warning and not an error. The GitHub token has no relationship to GitHub Actions and is for use with any GitHub status check. It’s highly encouraged to use a status check to get links to the output of LHCI and there’s really not a way to know you don’t care about status checks vs. just misconfiguring status checks.

In a future world in which we can detect that you’re not hosting your code on GH at all, then it makes sense to hide this check in that case. Otherwise we’d like to preserve it as a warning.

0reactions
patrickhulcecommented, Nov 16, 2019

As it’s a GitHub-specific concept, it won’t be relevant to all users (i.e., not to users whose source is not stored on GitHub)

Totally 👍 that’s why we’re going to check to see if the code is stored on github before showing this warning.

it could be made more generic

I think our approach here will just be adding new options for other providers ala bitbucketToken, gitlabToken, etc if necessary. We haven’t researched those either yet.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Creating a personal access token - GitHub Docs
Personal access tokens can only be used for HTTPS Git operations. If your repository uses an SSH remote URL, you will need to...
Read more >
Troubleshooting cloning errors - GitHub Docs
This error occurs if the default branch of a repository has been deleted on GitHub.com. Detecting this error is simple; Git will warn...
Read more >
Authenticating to GitHub - GitHub Docs
This error means that either the repository that you are trying to clone has submodules that you do not have access to or...
Read more >
Unable to authorize with my GitHub password (Unathorized ...
Until we fix this in hub, the solution is to generate a Personal Access Token (with at least repo scope) and paste it...
Read more >
Token expiration and revocation - GitHub Docs
If a valid OAuth token, GitHub App token, or personal access token is pushed to a public repository or public gist, the token...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found