GitHub Token Setup
To save your GitHub token as an environment variable in Ubuntu, you can follow these steps:
-
Open Terminal: Press
Ctrl+Alt+Tto open the terminal. -
Open Your Shell Profile: Open the shell profile file in a text editor. The shell profile file depends on the shell you are using. For
bash, it's.bashrc, and forzsh, it's.zshrc.
For bash:
For zsh:
-
Add the Environment Variable: Add the following line to the end of the file, replacing
YOUR_GITHUB_TOKENwith your actual GitHub token: -
Save and Close the File: Press
Ctrl+Oto save the file andCtrl+Xto exit the text editor. -
Reload the Shell Profile: Apply the changes by reloading your shell profile:
Now, your GitHub token will be available as an environment variable named GITHUB_TOKEN in your terminal sessions. You can verify this by running: