Notifications
Clear all

How to Install GitHub on Fedora and Kickstart Your First Project


(@sravan)
Script Novice
Joined: 3 months ago
Posts: 35
Topic starter  

The purpose of this article is to help you navigate the installation and configuration of GitHub, as well as guiding you through the creation of your first repository. Let's transform those ideas into active projects together!

Step 1: Installing Git on Fedora

First things first, GitHub is a web-based platform for version control using Git. So, we need to install Git on your Fedora system to start using GitHub for your projects.

Open your terminal and run the following command:

sudo dnf install git

This command will ask for your password and then proceed to install Git. Once installed, you can verify the installation by checking the Git version:

git --version

Step 2: Configuring Git with Your GitHub Account

Before you start using Git on your machine for GitHub projects, you need to configure it with your GitHub account details. Set your username and email address with these commands:

git config --global user.name "Your GitHub Username" git config --global user.email "youremail@example.com"

Replace "Your GitHub Username" and "youremail@example.com" with your actual GitHub username and the email address associated with your GitHub account.

Step 3: Generating a New SSH Key (Optional)

For a secure connection to GitHub without needing to enter your username and password each time, it's recommended to set up SSH keys. Run the following command, replacing "youremail@example.com" with your GitHub email:

ssh-keygen -t rsa -b 4096 -C "youremail@example.com"

Follow the prompts to create your SSH key. Once done, add the SSH key to your GitHub account by copying the output of:

cat ~/.ssh/id_rsa.pub

Then, go to GitHub -> Settings -> SSH and GPG keys -> New SSH key, and paste your key there.

Step 4: Creating Your First GitHub Repository

Now, let's create your first GitHub repository. Head over to GitHub and sign in. Click on the "+" icon in the top right corner and select "New repository." Give your repository a name, a brief description, and initialize it with a README file for a good start.

Step 5: Cloning Your Repository and Making Your First Commit

Back in your terminal, navigate to where you want your project to live, and clone your new repository:

git clone git@github.com:YourUsername/YourRepositoryName.git

Change directories into your new project:

cd YourRepositoryName

Now, you're ready to start adding files and making changes. After you've made some changes, add your files to Git, commit, and push them back to GitHub:

git add . git commit -m "Your commit message" git push origin main

 And that's it! You've successfully installed and configured GitHub on your Fedora system, created a new repository, and made your first commit.

If you run into any issues or have any questions, feel free to ask. The community is here to help!


   
Quote
Share: