Skip to content

Allowing Access to Private Repo #142

Closed

Description

@iiTzHyper

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 "/<Username>/<Repo Name>"

Is this the right way to configure it?

Activity

  1. robertbrignull commented on Aug 10, 2020

    @robertbrignull
    Contributor

    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.

  2. robertbrignull commented on Aug 10, 2020

    @robertbrignull
    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.

  3. robertbrignull commented on Aug 10, 2020

    @robertbrignull
    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.

  4. ehsankhfr commented on May 10, 2021

    @ehsankhfr

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

  5. robertbrignull commented on May 10, 2021

    @robertbrignull
    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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions