← All docs

How do I access GitHub? How do I set up a minimal GitHub token?

You can use the gh tool to login to GitHub on your VM, and it will work fine.

If you want to give the VM only access to one repo, and perhaps make that access read-only, you can use create a fine-grained personal access token. Choose a single repository, and add the "Contents" permission. Choose read-only or read-write as your use case desires.

After doing so, use the token like so:

$ cat > token
(paste the token and hit ctrl-d)
$ gh auth login --with-token < token
$ gh auth setup-git
$ git clone https://github.com/USER/REPO