Movatterモバイル変換


[0]ホーム

URL:


Skip to content
DEV Community
Log in Create account

DEV Community

c a
c a

Posted on • Originally published atchrisdevcode.hashnode.dev on

Git and GitHub SSH Configuration

Installing git

Install git from hereChoose a selection based on your operating system. For Linux and Ubuntu OS, you may use this alternative: Open your terminal and paste the command below:

sudo apt install git-all
Enter fullscreen modeExit fullscreen mode

Configure git with your GitHub Account

Ensure you have a GitHub account. If not, create one hereJoin GitHub.

First of all, we’ll configure your details to git. “Assuming your GitHub username is DevAcc and the email used on GitHub isdevacc@mail.com” On your terminal, use the following commands:

$ git config --global user.name "devAcc"$ git config --global user.email “devacc@mail.com”
Enter fullscreen modeExit fullscreen mode

To confirm the details usegit config --listWith that set, you should be ready to start working efficiently with your local repository.

Generating a git ssh key

This prevents git from requesting your username and password every time you push into GitHub. (it’s annoying) So this is how we do it:

Open your terminal and use the commands below:

ssh-keygen -t rsa -b 4096 -C "devacc@mail.com"
Enter fullscreen modeExit fullscreen mode

This will prompt you to enter a location to save the key and also create a password like a key to access that.

Connecting to Your GitHub Account

After this, you’ll need to copy the key to the clipboard. Use the command below to view the ssh key in a human-readable format:

cat < ~/.ssh/id_rsa.pub
Enter fullscreen modeExit fullscreen mode

key.png

Copy the key displayed to your clipboard.

Go to your GitHub profile and navigate to settings:https://github.com/settings/profile On the left side, panel click on SSH and GPG keys, then click on the top green button “New SSH” and paste the key there. Voila! You are good to go

My Profile

Top comments(0)

Subscribe
pic
Create template

Templates let you quickly answer FAQs or store snippets for re-use.

Dismiss

Are you sure you want to hide this comment? It will become hidden in your post, but will still be visible via the comment'spermalink.

For further actions, you may consider blocking this person and/orreporting abuse

Python(Django). JS. Software Eng
  • Location
    Kenya
  • Education
    Software Engineering
  • Work
    Software Eng Lead
  • Joined

More fromc a

DEV Community

We're a place where coders share, stay up-to-date and grow their careers.

Log in Create account

[8]ページ先頭

©2009-2025 Movatter.jp