You need to set HOMEBREW_GITHUB_API_TOKEN
for homebrew to avoid rate limiting, but how do you add it to homebrew config?
Add your access token to the osxkeychaingit clone or git pull . When you are prompted to supply your Password for 'https://[email protected]': you enter your access token instead. Your token should now get cached in the osxkeychain automatically.
If you are not redirected to VS Code, you can add your authorization token manually. In the browser window, you will receive your authorization token. Copy the token, and switch back to VS Code. Select Signing in to github.com... in the Status bar, paste the token, and hit Enter.
Simply provide your GitHub username and the access token and your files are uploaded to GitHub. Use your GitHub personal access token as your password when you perform a git push to GitHub operation. If you use Windows, your old credentials may be stored in the Windows Credentials Manager.
You create your API token on https://github.com/settings/tokens and then set the environment variable HOMEBREW_GITHUB_API_TOKEN
to the value of your token.
When creating the token, make sure that you only select the scopes you need. As pointed out in the answer by Chad, leaving all of the scopes unchecked is very reasonable!
Setting the token is done using the export
command. Example:
export HOMEBREW_GITHUB_API_TOKEN=xxxx
To make sure this is set whenever you open a terminal you can add this command to your ~/.brew_bashrc
or ~/.bash_profile
or any other file that is used during the initialisation of your shell file.
For future reference, this topic was discussed in the following two issues:
Other than what @reto has already stated, it wasn't clear to me what scopes to select when creating a token. I was concerned about this, as I didn't want to allow too much.
According to https://gist.github.com/christopheranderton/8644743 they confirmed you should deselect all scopes. I've done this on my box and so far things work as expected.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With