6FPS
Setting Up Git
0 Open
0 Closed

Make sure git is installed by running git --version in your terminal window. If you do not see a result like this: git version 2.x.x you will need to install git. This can be done by following the instructions here: https://git-scm.com/.

Once you have installed git you need to set your default config values. In your terminal window type this command: git config --global user.name "<your name here>" Followed by this command: git config --global user.email "<your email here>"

This should be the end of setting up your git environment. Next we need to setup ssh.

If it does not already exist create a .ssh folder in your user folder in your file browser. Open a terminal window in this .ssh folder and type the following command to generate an ssh key pair: ssh-keygen -t ed25519 -C "<your email here>" Complete the prompts to generate your ssh key.

While you are in the .ssh folder create a new file called config it should not have a file extension. Open this file in a text editor and add the following text:

Host code.smith-server.com
        Hostname 192.168.0.13
        User git
        Port 9022
	IdentityFile ~/.ssh/<your ssh key>

Then save and close the file.

Next navigate to your profile settings in the top right of this browser window. Then go to the SSH / GPG Keys tab and click Add Key near the top right. Name your key and then copy and paste the contents of your public key file into the content window. Your public key is found in the same location as the key you just created but it ends with the .pub extension. This file should be opened with a text editor.

Once you have pasted your public key into the content area click add key and you should now have a working git setup with ssh authentication.

CarOS
0 Open
0 Closed