debian 12

Debian 12/Bookworm hit a hard freeze before a final release three days ago. I downloaded an ISO, installed it as a KVM/QEMU virtual machine via Virtual Machine Manager 4, using my modest Linux Mint 21.1 system as a host system.

As you can see via neofetch, Debian 12 beta is running with the 6.1 version of the Linux kernel. I was pleasantly surprised when I saw this, and the use of this kernel may help explain how well it works as a VM. Other little items I noticed:

  • The Papirus icons are now part of the Debian repos. I was able to install those icons, and then select them, using apt and the regular settings app without having to install anything extra. I much prefer this icon set over just about any other. I’ve got it installed on my Linux Mint system, and I install it, along with the Cinnamon desktop, on every other distro I work with.
  • Python is 3.11.2. This is the latest release of the 3.11 series, which is the highest current release.
  • gcc/g++ is version 12.2. This is the highest current release.
  • git is version 2.39.2. The highest current release is 2.40.0. I won’t quibble about the difference.

The only problem I’ve encountered so far is installing PowerLine. As you can see I did install it, but in order to do that I had to create a Python virtual environment, then install the Python package powerline-status inside that virtual environment. I modified my login environment to automatically activate that environment, at which point everything works, both on the shell as well as in vim. Since this is a beta version I’m going to assume that it might get fixed before final release, or possibly soon after.

If I had to use one word to describe this upcoming release, it would be “polished.” I’ve finally come around to the Debian way of the Linux world, having gotten here via Ubuntu and Linux Mint, especially LMDE 5. I like all the updated tools that Debian 12 is bringing to the party. Linux Mint is unfortunately tied to the Ubuntu 22.04 LTS release train. I would hope that LMDE will step up to Debian 12. If it does, that means that LMDE will actually be ahead of Linux Mint, at least in the near future.

an adventure using ssh with github — the finish

In the post immediately before this, I wrote how I’ve started using the Yubico 5 Series key, how I created an SSH key pair using it, and how I managed to put the public key portion up in my account. The next step was to migrate one of my local project repos from HTTPS and username/password authentication to SSH and public/private key authentication.

Migrating the Repo

The command used to migrate a repo from HTTPS to SSH is git remote set-url origin git@github.com:[Username]/[Projectname].git, where Username is the email username you’ve used in your GitHub account, and Projectname.git is the, yes, project name of the repo you want to change. Because I have a number of projects in my account, I decided I wanted to automate this process. To that end I wrote a simple five line shell script to handle this.

#!/usr/bin/env bashgit remote set-url origin $(\git remote show origin | grep "Fetch URL"\ | sed 's/ *Fetch URL: //' \ | sed 's/https:\/\/github.com\//git@github.com:/')

I am not a master of either sed or regular expressions, and every time I choose to use these tools I go slowly and test my scripts every step of the way. When I started to develop this script I started with line 3 and tested each single line as it was added to the complete chain before adding the next line in the sequence. When I was satisfied the transformation was correct I wrapped the lines in parenthesis and added line two to complete the script. Let’s go over this script line by line.

  1. This is my usual bash shebang that I always put at the top of my scripts.
  2. This is the git command that will change the URL, and it’s the last command to be executed in the sequence, although it’s counter-intuitively the first command listed.
  3. This is the line that shows the repo’s origin, and we’re grepping for Fetch URL for the critical information we will need for the commands to follow.
  4. This is the line that uses sed to remove the leading text to Fetch URL, replacing all those characters with nothing, thus deleting it.
  5. The now-leading https://github.com is replaced with git@github.com:. The part of the Fetch URL that contains your username and projectname remain unchanged in the final string.

The parenthesis on lines 2 and 5 wrap the results of all that editing and pass it back as a single argument to the git command on line 2 of the script. Then the script finishes executing and we’re done.

Testing the Migration

The script, if it runs successfully, runs silently. To check that the migration was successful, you need to run the git command again to show the origin information.

~ git remote show origin* remote origin  Fetch URL: git@github.com:wbeebe/qt6.git  Push  URL: git@github.com:wbeebe/qt6.git  HEAD branch: main  Remote branch:main tracked  Local branch configured for 'git pull':main merges with remote main  Local ref configured for 'git push':main pushes to main (up to date)

When you run this command you need to be near the Yubico key, with the circled logo facing up. That’s the touch sensor that allows the key to work. When you execute the git command the Yubico key logo will start to flash. Put your thumb (or whatever digit you used to set up the key’s touch ID) over the flashing logo and the command will successfully execute as it did here. Now when I push up to GitHub, I have to touch the key for it to fully succeed. I was able to finally push my tag up to qt6.

At this point I now have full command line git control again. I will probably continue to use GitHub Desktop as it has some nice features wrapped up in the tool, but for plain old development and repo synchronization I can go back to what I was doing previously, without GitHub Desktop. For those who think this is too much effort, think again. I don’t think anyone wants to target anything I’ve got on GitHub, but you never know. I want my GitHub account locked down as tightly as reasonably possible, and this provides that feature. I’ll go the extra effort for security.