Writing a github extension in go

I hadn’t put any thought into using the github or gitlab CLI for a long time, but both are pretty useful. We are using standard github for projects and also a self installed gitlab. Both CLIs are golang programs.

First we need to authenticate.

⋊> ◦ gh auth login                                                         
? What account do you want to log into?
? You're already logged into Do you want to re-authenticate? Yes
? What is your preferred protocol for Git operations? SSH
? Upload your SSH public key to your GitHub account? /Users/niko/.ssh/
? Title for your SSH key: GitHub CLI
? How would you like to authenticate GitHub CLI? Login with a web browser

! First copy your one-time code: 4024-84CC
Press Enter to open in your browser... 
✓ Authentication complete.
- gh config set -h git_protocol ssh
✓ Configured git protocol

✓ Uploaded the SSH key to your GitHub account: 
✓ Logged in as hellonico
gh extension install redraw/gh-install

Using the Gitlab CLI

Find the certificate for OTC:

brew install glab

Use a proxy:

export HTTPS_PROXY="socks5://localhost:10090" https://gitlab.otc/-/profile/personal_access_tokens