How to Setup Git Linux - Foren-Ken/tech-journal GitHub Wiki
Setup
Start the Terminal for the Linux Distro
Access Superuser sudo su
Create a ssh key utilizing the ed25519 algorithm, this is done by the command ssh-keygen -t ed25519 -C "Add Email or other comment" or ssh-keygen -t rsa -b 4096 -C "Add Email or other comment
Use default location for ssh keygen (press enter)
Use a passphrase for the sshkeygen, github does not allow empty passphrases for the sshkeygen.
Check if the SSH agent is running with the following command eval "$(ssh-agent -s)"
Add SSH private key to the ssh-agent with the following command ssh-add /root/.ssh/[your ssh key] you may need to type in your ssh key password.
Access the following area in GitHub: Settings -> SSH and GPG keys -> New SSH Key.
Copy the content of /root/.ssh/[your ssh key].pub (including the E-Mail and the "ssh-ed25519" part and create the key
To confirm it all worked, try the command ssh -T [email protected]. GitHub will notify the user if everything worked properly.
Install GitHub onto the local system, this is done with the command apt-get install git
Clone the repository using the SSH link. This link is found in each repository under the "<> Code" symbol.
With this, the repository should be installed locally. Now any changes to the directory will be updated to github after the following commands are done:
a. Set up basic identification for your pushes. This is done with the command git config --global user.email "[email protected] and git config --global user.name "username"
b. git add . or a specific file if the entire repository shouldn't be upgraded.
c. git commit -m "Message" this is to prepare the message for the commit.
d. git push to push the added files to the GitHub directory.