How the heck do you even Git? [SOLVED]

Hey all

I am new to git and github repositiries and I’m running into a problem where the git repository is not cloning on openhabian.

I have a git account but I have not linked it to openhab in anyway. Do I have to connect an SSH key to both github and openhab in order to be able to download a git repo? Is the key automatically created when openhab first installs used for git? If so then would anyone be able to point me to instructions for setting up the openhab SSH key?

Here is what happens when I try to clone a repository:
I’m trying to download AgnetKs tuya script for integrating smart bulbs and here is the output when I try to clone the repo:

"$ git clone git@github.com:TheAgentK/tuya-mqtt.git
Cloning into ‘tuya-mqtt’…
The authenticity of host ‘github.com (192.30.253.112)’ can’t be established.
RSA key fingerprint is SHA256:nThbg6kXUpJWGl7E1IGOCspRomTxdCARLviKw6E5SY8.
Are you sure you want to continue connecting (yes/no)? y
Please type ‘yes’ or ‘no’: yes
Warning: Permanently added ‘github.com,192.30.253.112’ (RSA) to the list of known hosts.
git@github.com: Permission denied (publickey).
fatal: Could not read from remote repository.

Please make sure you have the correct access rights
and the repository exists."

What am not seeing here?

[EDIT]

I ended up just using Tuya Convert. Still haven’t learned how to git. Someday

Thanks for reading!
Ev

To simply download the repo files, you can use the HTTPS URL instead of SSH. You won’t need to deal with keys for that.
The command is:

git clone https://github.com/TheAgentK/tuya-mqtt.git

Thanks for the tip!

And you never will most likely. They are not really related to reach other.

No. As mentioned, you can use https, though I will warn you that can become a pain, particularly if you turn on two factor authentication. It is worth setting up ssh keys in my opinion. But the keys have nothing to do with openHAB and are associated with the openhabian user, but only in so far as the key files are stored in /home/openhabian/.ssh.

No, you will want to create them. There are tons of tutorials for setting up ssh keys for GitHub. Just search Google.

The key point is that once you create the key pair, you need to upload the public key to your GitHub account.

If u are using eclipse you can install egit from the marketplace and then got commands can be done with a mouse click.

I documented my own first steps with git - there you can find a small section regarding ssh keys and links to a more in-depth git introduction: https://community.openhab.org/t/git-based-non-public-versioning-and-deploy-workflow/