When using two GitHub accounts the gh cli gives very easy gh auth switch workflow from the cli.
from the docs
gh auth switch –help
Switch the active account for a GitHub host.
This command changes the authentication configuration that will
be used when running commands targeting the specified GitHub host.
If the specified host has two accounts, the active account will be switched
automatically. If there are more than two accounts, disambiguation will be
required either through the --user flag or an interactive prompt.
# list accounts
gh auth status
# switch accounds (interactive if more than 2, i've never seen this personally)
gh auth switch
Posts tagged: github
All posts with the tag "github"
3 posts
latest post 2025-12-07
Publishing rhythm
GitHub - jpillora/installer: One-liner for installing binaries from Github releases
One-liner for installing binaries from Github releases - jpillora/installer
GitHub · github.com [1]
This is a sick looking bash script generator for installing binaries off of github releases. it reccomends curl into bash, but you could curl into install.sh and toss that in your dotfiles repo or wherever.
Install installer with installer
curl -s https://i.jpillora.com/installer | bash
Note
This post is a thought [2]. It’s a short note that I make
about someone else’s content online #thoughts
References:
[1]: https://github.com/jpillora/installer
[2]: /thoughts/
Give github actions the -e flag in the shebang #! so they fail on any one
command failure. Otherwise each line will set the exit status, but only the
last one will be passed to ci.
#!/bin/bash -e
What is -e # [1]
The -e flag to the bash command allows your script to exit immediately if any
command within the script returns a non-zero exit status. This can be useful
for ensuring that your script exits with an error if any of the commands it
runs fail, which can help you identify and debug issues in your script. For
example, if you have a script that runs several commands and one of those
commands fails, the script will continue running without the -e flag, but will
exit immediately if the -e flag is present. This can make it easier to
troubleshoot your script and ensure that it runs correctly.
Solution for Windows # [2]
In windows the solution is not quite as simple. You can define a function in a
Windows batch script that wraps an if statement to check the exit status of a
command and handle any errors that may have occurred. Here is an example of how
you might define a function called “check_error” that does this:
:check_error
if errorlevel 1 (
echo An error occurred!
ex...