Skip to content

Latest commit

 

History

History
47 lines (25 loc) · 2.42 KB

github-pat.md

File metadata and controls

47 lines (25 loc) · 2.42 KB

⬅️  Build and Release Flow

⬅️  README

Create and use a GitHub PAT

PAT - personal access token

Since that in the build flow I'm using auxiliaries branches to host the build output from the applications inside of the mono repository. To be able to use the Node Module gh-pages to help with the tasks, since it's running outsite of the current repo folder on the Azure DevOps server we'll need to use another way to authenticate and be able to push the code to the GitHub repository.

💼  in case of a company, it's recommended to create an Automation User account on the GitHub, gave to this account the rights to access the company repositories and on that account create the GitHub PAT to be used.

Steps

  • create a GitHub PAT

    • add the rights to repo only

    • once it's showed on the screen, save it somewhere to be readded later (a txt file on your cloud account, like Google Drive, Dropbox, 1password, or any other), because it's only showed right after you create the token

github pat creation

  • get the token and place it inside of a text file without any extension github_pat
echo "${GITHUB_PAT_TOKEN_STRING}" > github_pat
  • upload the file github_pat to the Azure DevOps project Pipelines > Library > Secure files

upload github pat file

  • edit the github_pat file and change its permission to Authorize for use in all pipelines

authorize pipeline access to the github pat file

Further help