Kelly Carvalho
Posted on February 16, 2022
About me
Hello, Everyone. I’m a back-end developer. I like cats and roller skating, I'm crazy for challenges and I am always looking to learn something really new. I love to write and I intend to continue writing about different subjects here. This is my first post and I'm open to suggestions and if there's anything wrong you can signal.
Without further introductions let's get to the content.
It's not cool to needing to login every time that you have to push,actually you can solve it quite easily. You can just add your ssh key to github. Personally I use linux distribution Ubuntu as System Operator.
Ubuntu
Installing Git and checking if it's working
Usually the Git is already installed on Ubuntu, but sometimes is necessary to install. You can use the following command to install it
~$ sudo apt install git
Git
You can make sure it's install by using the following command
~$ git
If something like this comes up it means Git is already installed
It's important to configure your username and email for the commits from your user be recognized
Setting your user and email
~$ git config --global user.name "Meu Nome"
~$ git config --global user.email "meuemail@email.com"
Now you can see your configuration
~$ git config --global user.name
Meu Nome
~$ git config --global user.email
meuemail@email.com
Generating ssh keys
~$ ssh-keygen -t ed25519 -C "your_email@example.com"
This command in addition to generating the public and private key using Ed25519 algorithm, it will return the path where your keys are, usually the path is /home/userLinux.
Warning
You shouldn't show the private key to anyone
After locating where the .ssh keys were generated, you will copy the content from text file with .pub extension. This is your public key.
GitHub
Adding public ssh key to GitHub
Go to Settings on your GitHub profile
Section SSH and GPG keys
Click on Button "new SSH Key"
You can past your public key on text box and choose a title and it's ready! Git will not ask login anymore!
if you are starting now I hope this helps.
Thx 😃 cya...
Posted on February 16, 2022
Join Our Newsletter. No Spam, Only the good stuff.
Sign up to receive the latest update from our blog.