The need for this went away as they implemented gh auth login. I moved the following words from using github to here. It should be marked deprecated.
2FA – 2024
In March 2024, I had a look at github’s documentation again and came across among other pages, the CLI aka gh and how to install it on Debiab/Unbuntu. See also,
- https://docs.github.com/en/github-cli/github-cli/about-github-cli , from github
- A page on personal tokens, which would seem to be an enterprise solution, Managing your personal access tokens, again from githube
- About remote repositories, cloning with https
We need to work out how to use gh auth login. This is simple, its default mode is to boot a web browser, generate a one time token and ise the web page to authenticate. Cool!
The Git Credential Manager
This section was written when they first canned the CLI login and some of it is based on the need to install this on a Raspberry Pi which was not their first priority. I need to QA it to see how much of it is still correct and relevant.
So do do it in batch it seems you need the Git Credential Manager
- What is it and how does it work
- Git Credential Manager, a how to at github,com, and their documentation page.
- https://github.com/GitCredentialManager/git-credential-manager. the code page, hads a wiki obvs
- This page documents the environment variables.
- Installing the Binaries
- Install instructions inc package repos at github.com, there is no Raspberry Pi/arm version, I may need to use the source code version. I have asked for help at https://forums.raspberrypi.com
- Credential stores, on Linux, the GCM has helpers. This page documents how to install
gpgandpassas helpers. The man pass page at linux.die.net - https://github.com/GitCredentialManager/git-credential-manager/blob/release/docs/install.md#.NET-tool, how to install a Linux .NET tool, I have not done this yet as I am testing it on an Ubuntu VM.
- https://github.com/GitCredentialManager/git-credential-manager/blob/release/docs/install.md, how to install by OS, we need Debian for Ubuntu; we would for
- https://github.com/GitCredentialManager/git-credential-manager/releases/tag/v2.0.877, hosts the code, .deb or in tar or source.
- Will I need this, .NET from MS? Or this? The GCM compiles without installing .net in Ubuntu 22.
- Configuring GCM
- This page documents the environment variables.
- https://docs.github.com/en/authentication/keeping-your-account-and-data-secure/creating-a-personal-access-token
- About remote repositories, or about-remote-repositories#cloning-with-https-urls how to get access tokens FFS, and Fine-grained personal access tokens (Beta)
- https://docs.github.com/en/get-started/getting-started-with-git/caching-your-github-credentials-in-git, does this mean if one uses
git clone https, it obviates the need for all this shite
I was trying to make a pull on a pi, and was told I had to stash the build. I need to take some care on pulling the repo’s from github, it gets quite tricky although a correspondent on the pi forums recommends using ssh protocol.