You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
Variable name cannot start with "GITHUB_" prefix.
To Reproduce
Steps to reproduce the behavior:
Go to Settings > Environments > Add.. Environment variables > Add variable "GITHUB_TOKEN"
See error: Variable name cannot start with "GITHUB_" prefix.
Expected behavior
Note: If you also want to include the private repository, register the "personal access token" in the repository and set it to GITHUB_TOKEN specified in the workflow file.
Screenshots
Desktop (please complete the following information):
OS: Windows 11 Pro (22H2 22621.2428)
Browser: Google Chrome
Version: 117.0.5938.150 (Build oficial) (64 bits)
The text was updated successfully, but these errors were encountered:
danielcshn
changed the title
Variable name cannot start with "GITHUB_" prefix.
[Bug] Variable name cannot start with "GITHUB_" prefix.
Oct 17, 2023
As an environment variable, GITHUB_TOKEN cannot be overwritten because it is a reserved word.
The meaning of the sentence
If you also want to include the private repository, register the "personal access token" in the repository and set it to GITHUB_TOKEN specified in the workflow file.
is to change the value assigned to the GITHUB_TOKEN variable in GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}, not secrets.GITHUB_TOKEN itself.
You can modify the workflow to change GITHUB_TOKEN: ${{ secrets.MY_PERSONAL_ACCESS_TOKEN }} and add MY_PERSONAL_ACCESS_TOKEN to the actions secrets variable.
However, a simpler way to grant access to a private repository is to adjust the permissions of secrets.GITHUB_TOKEN in the repository where this workflow is located.
For instructions, refer to this link.
Describe the bug
Variable name cannot start with "GITHUB_" prefix.
To Reproduce
Steps to reproduce the behavior:
Expected behavior
Note: If you also want to include the private repository, register the "personal access token" in the repository and set it to GITHUB_TOKEN specified in the workflow file.
Screenshots
Desktop (please complete the following information):
The text was updated successfully, but these errors were encountered: