Enabling private GitHub Repo to Author the Lab Guides
  • 13 Jan 2025
  • 1 Minute to read
  • Contributors
  • Dark
    Light

Enabling private GitHub Repo to Author the Lab Guides

  • Dark
    Light

Article summary

This document will help you in enabling your private GitHub repo to author the lab guides in CloudLabs. Mainly you will need to create a πŸ”‘ personal access token of your private repo and share with CloudLabs team for the backend mapping. If you are utilising or would like to use a private GitHub repository to write and maintain your lab instructions / guides through CloudLabs, then follow the procedures below.

  1. Login to your private GitHub repository where you have the lab instructions / guides authored.

  2. In the upper-right corner of the page, click your profile photo, then click Settings.

  3. In the left sidebar, click < > Developer settings.

  4. In the left sidebar, under πŸ”‘ Personal access tokens, click Fine-grained tokens.

  5. click Generate new token.

  6. In the New Fine-grained personal access token section, enter the Token name, Set Expiration and enter the Description.

  7. In the repository access section, select the only select repository and select the private repository where the lab guides are resides.

  8. In the Permissions section, Click on Repository Permissions.

  9. Move to Contents section select Read-only access.

  10. Go to the Overview section, click on Generate token.

  11. Once, the token is succesfully generated, make sure to copy your personal access token now. You won’t be able to see it again!

Note: In order to finish the backend configuration, you must share the generated token with the CloudLabs team. Therefore, kindly provide the token you created and saved for later usage.

Now, you'd need to build a GitHub Master document by following the instructions given here: https://docs.cloudlabs.ai/LabDeveloper/AuthoringLabGuides#github-master-document​

The RawFilePath URLs within the Master Document must be modified after you have the GitHub Master document prepared by following the steps listed in above link.

  1. You need to include a substring because you are using the private repository. Substring needs to be added in between the https:// and raw.githubusercontent.com/CloudLabsAI-Azure/AIW-WVD-Immersion/main/00-Overview.md"

    • Substring to be added: "docs-api.cloudlabs.ai/repos/"

Example: if your Raw URL is https://raw.githubusercontent.com/CloudLabsAI-Azure/AIW-WVD-Immersion/main/00-Overview.md then after adding subsstring , the Raw URL will appear like below:

  1. Now, add the docs-api.cloudlabs.ai/repos/ as mentioned in the previous steps to all the raw URLs that are available.

  2. You must now obtain the Master document's RAW URL and add the docs-api.cloudlabs.ai/repos/ substring by following the same instructions as step 1.

  • Click on Raw to get the Raw URL of your Master document

  • Copy the URL as shown in the below image

  • Now, by default, the RAW URL will also get and show the access token at the end of the URL; however, you have to remove it from the URL because it is not necessary.

  • Now, add the docs-api.cloudlabs.ai/repos/ substring to the RAW URL

  • Finally this is how your GitHub Master Document URL will appear which you will be using in CloudLabs template.