- First you will need an API Key from Github for Code Stream to authenticate
- Log in to GitHub or Github Enteprise
- Click on your Avatar in the upper right corner
- Choose Settings
- On the left navigation, choose ‘Developer Settings’
- On the left, choose ‘Personal access tokens’
- Click ‘Generate new token’
- Enter a meaningful description
- Select the permissions you need this token to have. Note: Grant minimum permissions needed, you can edit the permissions later if you need to.
- Click ‘Generate Token’
- Copy the token presented on the screen immediately, once you close the window you cannot view the token ever again.
- Store this token in a safe place, it is a password!
- Log in to Code Stream
- In the left navigate pane, expand Configure Endpoints
- Select + New Endpoint
- Enter Endpoint details
- Project: Select from the Dropdown
- Type: Git
- Enter a descriptive name (include the Repo name). Ex: “GitHub Enterprise myapp_repo”
- Mark restricted: No
- Git Server Type: GitHub or GitHub Enterprise
- Full Repo path. Ex: https://www.github.com/bmac/myapp_repo
- Click Accept Certificate
- Look over the certificate and accept if it is authentic
- Branch. Ex: master
- Authentication Type: Private Token
- Enter your github username.
- Click ‘Create Variable’
- Note: You should create a variable for your token so that it does not get stored in code.
- Enter a meaningful name for this token. Ex: “Brians GitHub Secret”
- Type “SECRET”
- Value: Enter the GitHub token you created
- Enter a Description of what rights this token has in Github
- Click Create
- The token field will be pre-filled after creation.
example: ${var.Brians GitHub Secret}
- The token field will be pre-filled after creation.
- Click Validate. If errors detected, correct and Validate again
- Click Create
Code Stream 8 – How to Create a GitHub Endpoint
by
Tags:
Leave a Reply