Last active
May 25, 2024 18:42
-
-
Save rakibulinux/994728ae73fe40db0630fddccb41d937 to your computer and use it in GitHub Desktop.
Generating a new SSH key and adding it to the ssh-agent
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# Install latest Git & Git Configure | |
sudo add-apt-repository ppa:git-core/ppa | |
sudo apt update | |
sudo apt install git | |
sudo -i | |
sudo git config --global user.name "Rakib Linux" | |
sudo git config --global user.email [email protected] | |
ssh-keygen -t rsa -b 4096 -C "[email protected]" | |
eval "$(ssh-agent -s)" | |
ssh-add ~/.ssh/id_rsa | |
cat ~/.ssh/id_rsa.pub | |
# copy and add ssh key to Github | |
ssh -T [email protected] | |
ssh -T [email protected] | |
ssh -T [email protected] | |
git --version | |
git config --list | |
#How can I remove an entry in global configuration with git config? | |
git config --global --edit | |
#You can use the --unset flag of git config to do this like so: | |
git config --global --unset user.name | |
git config --global --unset user.email | |
#If you have more variables for one config you can use: | |
git config --global --unset-all user.name | |
#You can watch this video: https://youtu.be/2JVha4r7wpE |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment