Setting up SSH to GitHub git clone into your Oracle Cloud Linux Ubuntu VM with VNC

Setting up SSH to GitHub git clone into your Oracle Cloud Linux Ubuntu VM with VNC

I received the following fatal: Authentication failed for... error when attempting to authenticate with GitHub from within my Virtual Machine, with my GitHub username and password:

I'm trying to be as succinct as possible. I just accomplished this but needed help finding something that explicitly walked me through how to do this. Here are some assumptions:

  • You have followed these instructions for Installing Flask on an Ubuntu Virtual Machine (VM) in Oracle Cloud Infrastructure*
  • You at least have a Free Tier account in OCI
  • You have an existing GitHub account
  • You're already or presently signed into (via SSH presumably) your Linux Virtual Machine (like I am in the images you'll soon see)


*I suppose you don't need anything related to Flask or Python; you need to follow the steps to the point where you need to git clone something in your Virtual Machine (aka your Compute Instance).


REMINDER: You are signed in to a Linux machine! The commands you follow (in GitHub or here) WILL NEED TO BE FOR LINUX!


What happened?

I received the following fatal: Authentication failed for... error when attempting to authenticate with GitHub from within my Virtual Machine, with my GitHub username and password:

I am trying to clone an already existing repository in my Virtual Machine.
Epic failure when trying to sign in using your username and password.

Authenticating with SSH

Since the HTTPS method of authenticating doesn't work, the next available option is to clone via SSH.

Even if you don't know what any of this means, as long as you follow along with the Linux instructions in the GitHub documentation, you'll be fine. You'll want to first check to see if you have existing SSH keys in your Linux VM (spoiler: you won't, at least not for GitHub).

Next, you can follow the Linux instructions for generating new SSH keys.


Then, add your PRIVATE key (NOT your public key) to your SSH agent (don't even ask me what the hell an SSH agent is, isn't, or does). I presume the SSH agent assists in authentication.


Finally, add your Public key to GitHub. They've provided instructions here, but I'm including some screenshots of what this looks like when done for your OCI VM.

Navigate to settings
Next, click SSH and GPG keys
Add your public SSH key with your email, too!

Once you've saved, you can THEN git pull from within your OCI VM. As can be seen here:

And that's all for now. I mostly wrote this blog out of sheer frustration. Please share it with your friends and bookmark it for future use!

Follow

And remember to follow, like, subscribe, share, taunt, troll, or stalk me!

#linux #vm #computeinstance #oci #oraclecloud #oraclecloudinfrastructure #oracledatabase #friday #tutorial

?? Ryan O'Connor ??

?? Oracle APEX | PL/SQL Software Developer | Tech Enthusiast ??

6 个月

A fun activity for a Saturday afternoon :)

要查看或添加评论,请登录

社区洞察

其他会员也浏览了