Skip to content

Github Setup For Open Source Projects

Kartik Choudhary edited this page Aug 30, 2020 · 8 revisions

How to create a Personal Token?

Generate a Github personal access token using these instructions. Make sure you don't select any scope just generate a simple token

What is that token and why do I need it?

Tokens are used to access the Github API, and is used to get your contents from Github, about your profile and also your Pinned Repositories. See the sections Github Profile and Open Source sections.

Open Source Section profile-section

Steps to Set Personal Access Token

On Windows (Using Command Prompt(aka cmd) or Powershell)

  1. Open a command prompt windows(⊞ Win+R; type cmd and enter)
  2. Type the below command replacing <GitHub personal access token> with your Access token which you got from Github.
 setx REACT_APP_GITHUB_TOKEN "<GitHub personal access token>"

What this command does is it creates an environment variable REACT_APP_GITHUB_TOKEN with your Github Access tokens. This will be permanent and can be used in all future build.

  1. Finally, follow the other steps in ReadMe and then deploy it to Github or create production pages.

On Mac/Linux

  1. Open a Terminal(Alt+Ctrl+T).
  2. Type the below command replacing <GitHub personal access token> with your Access token which you got from Github.
 export REACT_APP_GITHUB_TOKEN="<GitHub personal access token>"

This command sets the environment variable REACT_APP_GITHUB_TOKEN which is used while building the site.

  1. Finally, follow the other steps in ReadMe and then deploy it to Github or create production pages.

Set showGithubProfile to true or false to show Contact Profile using Github, defaults to false. Note: Open Source Projects section only show pinned items of your Github. If you are seeing

empty-profile

Please follow this Instructions.

Clone this wiki locally