GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Unable to use built-in GitHub Token for avoiding rate limit issues on GHES · Issue #683 · actions/setup-python

Unable to use built-in GitHub Token for avoiding rate limit issues on GHES #683

New issue
Copy link
New issue
Copy link
Closed
Closed
Unable to use built-in GitHub Token for avoiding rate limit issues on GHES#683
Copy link
Assignees
dmitry-shibanov
Labels
bugSomething isn't workingSomething isn't working

Description

@mzwiesler
mzwiesler
opened on Jun 14, 2023
Issue body actions

Description:
For our enterprise we are facing "API rate limit exceeded ..." errors. I read the documentation how to avoid rate limit issues but for our enterprise using PAT is not feasible. I would like to use the GITHUB-TOKEN for authentication in my Github Workflow since this is the recommended way from GitHub. However, this is not possible at the moment resulting in a Bad Credentials error.

It seems that the AUTH variable variable is not usable in this case since only personal tokens are authenticated with Authorization: token <TOKEN> but for GITHUB-TOKEN one needs to use Authorization: <GITHUB_TOKEN> instead as can be seen in the workflow below in step read limit.

Action version:
4.6.1

Platform:

  • Ubuntu

Runner type:

  • Self-hosted

Tools version:

All

Repro steps:

On GHES, following this example I used the following workflow:

name: CI With GitHub Token

on: [workflow_dispatch]

jobs:
  sample_build:
    runs-on: [azure-runners]
    steps:
      - name: "rate limit"
        run: |
          curl \
            -H "Accept: application/vnd.github.v3+json" \
            -H "Authorization: $TOKEN" \
            https://api.github.com/rate_limit
        env:
          TOKEN: ${{ secrets.GITHUB_TOKEN }}

      - name: Clear the tool cache
        run: rm -rf /Users/runner/hostedtoolcache/Python/

      - name: Set up Python
        uses: actions/[email protected]
        with:
          token: ${{ secrets.GITHUB_TOKEN }}
          python-version: 3.9.12

      - name: "rate limit"
        run: |
          curl \
            -H "Accept: application/vnd.github.v3+json" \
            -H "Authorization: $TOKEN" \
            https://api.github.com/rate_limit
        env:
          TOKEN: ${{ secrets.GITHUB_TOKEN }}

Expected behavior:
Installation of python version 3.9.12 and drop of rate limits from 60 to 58.

Actual behavior:
Failure with error Bad Credentials.
image

Activity

  1. mzwiesler
    added
    bugSomething isn't workingSomething isn't working
    needs triage
    on Jun 14, 2023
  2. dmitry-shibanov commented on Jun 14, 2023

    @dmitry-shibanov
    dmitry-shibanov
    on Jun 14, 2023
    Contributor
    More actions

    Hello @mzwiesler. Thank you for your report. I think it is an expected behaviour. Could you please take a look at these:

    • https://github.com/actions/setup-python/blob/main/action.yml#L18-L20
    • Only use github.token on github.com #443
  3. dmitry-shibanov
    removed
    needs triage
    on Jun 14, 2023
  4. dmitry-shibanov
    self-assigned this
    on Jun 14, 2023
  5. mzwiesler commented on Jun 16, 2023

    @mzwiesler
    mzwiesler
    on Jun 16, 2023
    Author
    More actions

    @dmitry-shibanov Yes you are correct. Thank you for the links and your assistance.

  6. mzwiesler
    closed this as completedon Jun 16, 2023
  7. v-priya-kinthali commented on Mar 13, 2024

    @v-priya-kinthali
    v-priya-kinthali
    on Mar 13, 2024
    Contributor
    More actions

    Hello @mzwiesler ,
    Could you kindly verify if the issue related to the rate limit "API rate limit exceeded ..." has been resolved and confirm that no other issues have emerged while using the setup-actions-demo/setup-python@main branch.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

  • @dmitry-shibanov
    dmitry-shibanov

Labels

bugSomething isn't workingSomething isn't working

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

    You are visitor 01402520 — GeezerVison does not store the pages you look up.
    Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.