I am trying to push my new project in recently created Github repository. But having SSH authentication issue. I don't know the key management, as which key is to used and how. In my github web dashboard I have 2 keys. One with my login account and one with Github for Windows.
How can I use the correct key for committing. Because this key is not what mentioned in my Github dashboard. I created new RSA Key in Eclipse. Saved it with Passphrase. And added this key into my Github account. But still it's showing me following key fingure print.
Any help?
My repos: https://github.com/tahirakram/Likhari
URL Information
Getting this error about SSH Keys
ssh://git#github.com:22: org.eclipse.jgit.transport.CredentialItem$YesNoType:
The authenticity of host 'github.com' can't be established.
RSA key fingerprint is 16:27:ac:a5:xx:xx:xx:xx:xx:xx:a6:48.
Are you sure you want to continue connecting?
This page (from Lech Migdal's blog ) recommends:
In theory it's nothing bad, you press the "Yes" button and you're done.
But to my surprise there was no "Yes" button :-) Only "OK" and "Details", both of them didn't result in the code being pushed to the sf.net. Restart (as suggested on some sites) didn't help.
In Eclipse switch to "Git Repositories" perspective
Expand your project, add new Remote repository (I called it "sourceforge")
Paste the URI that sourceforge provides on your project website and the proper password (yes, this time it will work)
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"
This page also ask you to check your SSH settings.
Point 2 is better illustrated by the section "Adding a Remote Configuration" of the Egit User Guide:
This is done using a context menu action on the "Remotes" node.
A wizard is started asking for the name of the new configuration and whether to configure Fetch, Push, or both:
You will get that error message for every new host, when you connect the first time using SSH. Potentially a malicious person could have set up a server, which now answered your request, but is not the real github.com server. That is why you should verify the fingerprint and that is what the whole error message wants to tell you.
If you accept that dialog, it will work fine afterwards.
ssh-keyscan github.com >> ~/.ssh/known_hosts
Related
I'm trying to deploy my app to vultr.
I have two different repository for front and back app.
I created ssh key on server and added it to deploy keys section of my backend repository on GitHub.
I can pull backend app it's ok.
But When I try to add same ssh key into my deploy keys section of frontend app, it says "key is already in use".
Then I created another ssh key on server and added it into deploy keys of front end repository..
But that time when I try to clone app it tries to read ssh key that I first created...
I think I need some think like "clone by using a specific ssh key". How can I fix this?
Or is there an easier way to deploy different apps via using ssh?
To use your second key, you need to reference it in a ~/.ssh/config file with:
Host deploy
Hostname github.com
User git
IdentityFile ~/.ssh/yourSecondSSHKey
The git clone deploy:YourGithubName/YourAppRepository
That would force Git/SSH to use your second key.
In preferences→Integrations→GitHub I uploaded a GitKraken SSH key to GitHub. However, after pressing “Pull” GitKraken still asks me to log in, which does not work. The login dialog pops up again and again.
Any idea?
Looks like a closed port at our firewall was the problem. I wonder if GitKraken can’t tell the difference between that and a failed authentication at GitHub. And if so, maybe it should first test the SSH port with other means, e.g. authenticating somewhere it knows it can.
today I've moved my private github repository to newly created organization (of which I'm an owner). I've changed my remote origin to git#github.com:organization/repo.git. I'm not able to push to remote because I've got an error saying
Error: Permission to organization/repo.git denied to MyGithubUsername.
fatal: Could not read from remote repository.
Please make sure you have the correct access rights and the repository exists.
I've checked that my account is owner of organization and repository exists.
Disable third-party application access restrictions as suggested in atom/github #1010.422882361.
I ran into this problem today and indeed as Ephellon Dantzler suggests, disabling 3rd-party access restrictions fixed it.
However, I did not really like that solution so I started reading the documentation. On the About OAuth App access reistrictions page, Github mentions that enabling 3rd party restrictions will block:
SSH keys created before February 2014 immediately lose access to the organization's resources (this includes user and deploy keys).
I created my key well before that so I just created a new SSH key and added to Github following their instructions.
After that, I was able to interface with my organization's private repository even when 3rd-party access restrictions was enabled.
I managed to find an answer. Maybe I did something wrong, or maybe it was because of github issues, but even if I was stated as an owner of Organization I had only rights to read repository. I couldn't change permission for myself because "you can't change permission for owner". I changed permissions for all members to admin, and because for now I'm the only one member of organization it's not a big deal.
The solution I found to this problem was creating a P.A.T (Personal Access Token) and using it in the spot of my password when pushing to the repo.
The way you can create a P.A.T is by going to:
Github.com >Login> Settings> Developer Settings> Personal Access Tokens > Generate New Token. I selected all the options for my token and then copied the token that was generated and used it as my password when I was asked to enter my credentials.
This took me a few hours to figure out and was very frustrating. I hope this info can help someone else!
Using GitHub Desktop..I was having a weird bug where I was owner of the organization, and admin of the repo(I had full rights) on my organization's repo. I decided to go into the command line, and push from there (Type "git push") and that fixed it!
It pushed, and I could now push from GitHub Desktop again.
Weird, but hope it helps someone!
For me, everything was ok in the Settings and with my key. Yet Github Desktop could not push (or even fetch) to/from the remote because it didn't trust the IP address. To find and fix I switched to the CLI and ran:
git fetch
which replied with
The authenticity of host 'github.com (140.82.114.4)' can't be established.
RSA key fingerprint is SHA256:<long string>.
Are you sure you want to continue connecting (yes/no)?
therefore revealing the issue. Either Github has changed their IP or I hadn't connected to this repo on my new machine (with the old key). Replying yes added the IP to my .ssh/known_hosts and then Github Desktop worked just fine again.
Warning: Permanently added 'github.com,140.82.114.4' (RSA) to the list of known hosts.
So I ran into this issue recently with an SSH key generated in 2018 and Ephellon Grey's answer pointed me in the right direction. My personal SSH key was added to GitHub by SourceTree and SourceTree was not an authorized third-party app on my organization page. Hence pushes authorized with that SSH key were being rejected. I just had to grant third-party access to SourceTree on the organization and now I can push to repos contained within.
When I try to push my project on Github, I have to sign in every time with my Github account before the push. And I don't understand why, on certain projects I don't need to do this, only on one project.
MacBook-Pro-Firstname:ProjectName firstname$ git push origin master
Username for 'https://github.com': email#gmail.com
Password for 'https://email#gmail.com#gmail.com#github.com': *******
How can I remove the sign in process?
GitHub offers two different authentication methods for read/write access. The first, which you appear to be using, is the HTTPS method and requires username/password authentication. The other way is via SSH which uses public/private key pairs to authenticate rather than a username/password combination.
To change the URL of the repository to the SSH version, you can use git config remote.origin.url git#github.com:username/repository.git
It sounds like you already have SSH keys generated and added to your account if you don't need to authenticate for some projects, but if you don't you can set it up via this link.
I am not entirely sure but I believe you will need to create an SSH key: https://help.github.com/articles/generating-ssh-keys
You need to set up a public SSH key with Github. See this article: https://help.github.com/articles/generating-ssh-keys
In GitHub I am supposed to go to Account Setting, then click on SSH keys, and there I should have some way to add an SSH Key. The instructions at http://help.github.com/win-set-up-git/ say: "click "Add SSH Key". But that link does not exist. Instead I get the following:
On Sunday March 4, 2012 a security vulnerability related to SSH keys
(public keys) was discovered. For your protection and to prevent
unauthorized access we have disabled your public keys until you
approve them.
Need help verifying fingerprints?
along with Accept and Reject buttons next to ssh keys I have uploaded but not verified since the exploit was found. I do not want to accept or reject any of these other ssh keys at this point. All I want is to add a new SSH Key. How do I do it?
Many thanks!
After accepting/rejecting all the existing ssh keys the link was visible again in my account.