Eric
Eric

Reputation: 11

SSH and HTTPS Keys don't work for my Eclipse when trying to connect to GitHub

I'm trying to connect my Eclipse with GitHub by SSH.

In Eclipse, I've generated an RSA key, saved it, and apply.
I also added the SSH to my Github account.

But I still got the following:

Prompt during connecting by SSH

SSH fail

Nor would HTTPS work. I tried it. It failed, suggesting that I should set http.sslVerify=false.
I did it, but it didn't help, and I still got this suggestion.

HTTPS fail

I'm using Eclipse IDE 2021-09, and have updated the Git plugin.

Upvotes: 1

Views: 4013

Answers (3)

Eric
Eric

Reputation: 11

I needed to accept the fingerprints to create a known_hosts file under Users/admin/.ssh/ so that GitHub knows I had verified its fingerprints. I was not familiar with Git and SSH when I posted the problem. I should've answered this three years ago.

Upvotes: 0

KKA
KKA

Reputation: 191

Suggest to use token instead of SSH. Your Github>Accounts>Settings>Developer Settings>Personal Access Tokens> Create. Copy generated token and use it as your password while cloning or committing enter image description here

Upvotes: 0

VonC
VonC

Reputation: 1326666

Try the process described here

  • In Eclipse switch to "Git Repositories" perspective
  • Expand your project, add new Remote repository: see "Eclipse Remotes" for details
  • Paste the URI that the remote server provides on your project website
  • Now Eclipse will ask you if you trust the RSA key fingerprint and will add it to known_hosts file
  • "Dry-Run" (should work), "Save"

But if you switch to an HTTPS GitHub URL, make sure to:

  • no set http.sslVerify=false
  • use a PAT (Personal Access Token) as password
  • memorize it, with "Store in Secure storage", under this menu: "Preferences | General | Security | Secure storage", in Eclispe 4.x

Upvotes: 1

Related Questions