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

Allowing Access to Private Repo #142

Closed
iiTzHyper opened this issue Aug 10, 2020 · 5 comments
Closed

Allowing Access to Private Repo #142

iiTzHyper opened this issue Aug 10, 2020 · 5 comments

Comments

@iiTzHyper
Copy link

I am not quite sure how to configure this. I have heard that I can use GITHUB_TOKEN authenticate.

- name: Configuring GitHub Access
        env:
            TOKEN: ${{ secrets.GITHUB_TOKEN }}
        run:
          git config --global url."https://${TOKEN}@github.com/<Username>/<Repo Name>".insteadOf "https://github.com/<Username>/<Repo Name>"

Is this the right way to configure it?

@robertbrignull
Copy link
Contributor

robertbrignull commented Aug 10, 2020

Could you explain more what you're trying to achieve and what is not working? This currently seems to be more of a general GitHub Actions question, and not really about the codeql-action.

Perhaps the issue is that the token from secrets.GITHUB_TOKEN only has access to read the repository that the workflow is from. If you want to clone other private repositories in your workflow you'll need to use a personal access token or a deploy key.

@robertbrignull
Copy link
Contributor

What is the error message you are getting?

The only place where the codeql-action requires access to another repository is if you are wanting to run queries located in that repository. Is that what you're wanting to do?

Also note that code scanning is only free for public repositories, and is still in beta so you need to sign up for it. You can sign up for the beta on the "security" tab on your repository.

@robertbrignull
Copy link
Contributor

You're still on the waiting list as you only signed up recently and we're processing people from the start. You'll be onboarded in time. Also, code scanning is only going to be free on open source repositories. To use it on private repositories you'll need to contact GitHub sales.

@ehsankhfr
Copy link

@robertbrignull is the codeql still unavailable for non-enterprise accounts` private repos?

@robertbrignull
Copy link
Contributor

@ehsankhfr, yes, CodeQL and Code Scanning are still both only freely available for public repositories. To use on private repositories you'll need a paid account.

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