GitHub Desktop is a widely used graphical interface that simplifies Git repository management, making it easier for developers to collaborate and manage their code. With features like visual diffs, branch management, and seamless GitHub integration, it’s a tool that enhances productivity, particularly for those who prefer a GUI over command-line Git operations. The Linux fork of GitHub Desktop, maintained by Shiftkey, brings these benefits to Fedora users, ensuring a consistent experience across platforms.
On Fedora 40 or 39, you can install GitHub Desktop either via the terminal using the third-party repository hosted by Shiftkey or through Flatpak with Flathub, offering a flexible installation method depending on your preferences. This guide will walk you through both installation options, ensuring that you can easily set up and use GitHub Desktop on your Fedora system.
Method 1: Install GitHub Desktop via RPM
Update Fedora Before GitHub Desktop Installation
Before installing GitHub Desktop, ensuring your Fedora system is up-to-date is essential to avoid potential conflicts. Open your terminal and enter the following command to check for any outstanding updates:
sudo dnf upgrade --refresh
Import GitHub Desktop RPM
GitHub Desktop doesn’t offer official support for Linux distributions; a community-driven project called Shiftkey/Desktop supports various Linux distributions, including Fedora. Currently, a Shiftkey RPM mirror is titled “GitHub Desktop Linux Fork,” making importing, installing, and keeping GitHub Desktop up-to-date accessible for Fedora users.
There are currently two RPM mirrors, and we recommend using the first one provided by Shiftkey. However, you can use the second one as a backup if you encounter any issues.
Here are the steps to install GitHub Desktop on Fedora Linux using the shiftkey third-party RPM:
Option 1: Import @shiftkey package feed:
First, import the GPG key using the following command:
sudo rpm --import https://rpm.packages.shiftkey.dev/gpg.key
After importing the GPG key, use the following command to import the ShiftKey RPM repo:
sudo sh -c 'echo -e "[shiftkey-packages]\nname=GitHub Desktop\nbaseurl=https://rpm.packages.shiftkey.dev/rpm/\nenabled=1\ngpgcheck=1\nrepo_gpgcheck=1\ngpgkey=https://rpm.packages.shiftkey.dev/gpg.key" > /etc/yum.repos.d/shiftkey-packages.repo'
Note: Try option two below if you have issues with the above repository.
Option 2: @mwt package feed:
First, import the GPG key using the following command:
sudo rpm --import https://mirror.mwt.me/shiftkey-desktop/gpgkey
After importing the GPG key, use the following command to import the mtw-packages RPM repo:
sudo sh -c 'echo -e "[mwt-packages]\nname=GitHub Desktop\nbaseurl=https://mirror.mwt.me/shiftkey-desktop/rpm\nenabled=1\ngpgcheck=1\nrepo_gpgcheck=1\ngpgkey=https://mirror.mwt.me/shiftkey-desktop/gpgkey" > /etc/yum.repos.d/mwt-packages.repo'
Install GitHub Desktop via DNF Command
Finally, run the following command to install the GitHub Desktop client:
sudo dnf install github-desktop
Method 2: Install GitHub Desktop via Flatpak and Flathub
This section outlines a detailed procedure for installing GitHub Desktop on Fedora Linux utilizing Flatpak and the Flathub repository, an alternative to the DNF method.
Enable Flathub for GitHub Desktop
First, add the Flathub repository to your system to access various applications, including GitHub Desktop. Run the command below to add the Flathub repository to Flatpak if you haven’t done so already:
flatpak remote-add --if-not-exists flathub https://flathub.org/repo/flathub.flatpakrepo
This command adds the Flathub repository to Flatpak, allowing further interactions when installing applications.
Install GitHub Desktop via Flatpak Command
Having established Flatpak and Flathub, proceed with the installation of GitHub Desktop by running the following command:
This command triggers a search for the GitHub Desktop package within the Flathub repository and initiates its installation on your system.
Troubleshoot Flathub Activation
You may find it inactive despite importing Flathub on Fedora Linux in certain instances. Execute the following command to enable Flathub:
flatpak remote-modify --enable flathub
Launching GitHub Desktop
CLI Methods to Launch GitHub Desktop
If you prefer to use the terminal, open it and type the following command to launch the GitHub Desktop client immediately:
github-desktop
Alternatively, Flatpak installations will need to run the following:
flatpak run io.github.shiftey.Desktop
GUI Method to Launch GitHub Desktop
If you prefer to use the application icon, you can find it in the following path:
Activities > Show Applications > GitHub Desktop
Additional GitHub Desktop Commands
Update GitHub Desktop
Keeping your GitHub Desktop client up-to-date is essential to ensure that you have access to the latest features and bug fixes. If you imported the RPM as outlined in this guide, updating GitHub Desktop is straightforward.
Run the following command using the DNF package manager to check for updates:
sudo dnf upgrade --refresh
Alternatively, to do the same function with Flatpak, run the alternative command:
flatpak update
This will check for updates for all applications installed via Flatpak, including GitHub Desktop.
Remove GitHub Desktop
DNF Remove Method For GitHub Desktop
If you no longer need to use GitHub Desktop and want to remove it from your system, you can do so with the following command:
sudo dnf remove github-desktop
Additionally, suppose you don’t plan to use GitHub Desktop again using the RPM method. In that case, you can remove the repositories using one of the following commands that match the repository you imported:
sudo rm /etc/yum.repos.d/shiftkey-packages.repo
sudo rm /etc/yum.repos.d/mwt-packages.repo
Flatpak Remove Method
The method of removing GitHub Desktop from Flatpak is straightforward; just run this command, which will remove the application:
flatpak uninstall io.github.shiftey.Desktop