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.
Related
I'm trying to push some files to my new(second) Github account through terminal. I've tried so many times with similar questions, but it keeps saying this below
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.
To be more specific, at first, I had a Github account(First) and I was able to do 'push' or 'pull' function using SSH URL, but this problem happens when I try to push some files to a new repository of the new account(Second). I've also tried removing the URL, but still it didn't work, and now I'm at a loss about what to do.
Someone said I can use Https URL instead of SSH URL, but I want to resolve this problem not avoiding things that happened.
Thanks!:D
SSH authentication keys are only valid for an Account.
If you made a new Github account and create the repository with this account, you will need to grant read permission at least for your first Github account to be able to access it.
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.
My android device broke and I lost access to Github and Bitbucket 2 factor authentication codes.
Unfortunately I didn't save the recovery codes or set up a backup phone number to receive codes by SMS, and I'm not signed in to Github and Bitbucket on any computer.
Is there another way to gain access to my Github and Bitbucket account?
Luckily for me, there is a way to do this if you assigned a SSH key to your account.
What you need to do is to run this command on the computer where you have the SSH key:
ssh -T git#github.com verify
And send the output to Github support. With that output they are able to disable your 2fa and allowing you to login just with your password.
The output should look like this:
Please provide the following verification token to GitHub Support.
002de4e72d08f47b0b828bab0224dxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxf6174ce54ab0040aa7075626c69635f6b6579ce008cacf9
If you are reading this it's probably too late for that advice but don't be stupid like I was. Save the recovery codes or set up a phone number!
This works only if you have access to your bitbucket and github via SSH.
Even for #achiash 's answer.
For github as #achiash mentioned you can use
ssh -T git#github.com verify
This will print the verification code on your screen.
For bitbucket you can use
ssh git#bitbucket.org recovery_codes
This will ask you for password. Enter the password and it will print your recover codes.
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
We recently moved our github from one account owner to another, and now all of the sudden when I do a git pull or any git command on the remote repo, it asks me for github username and password.
My git-config says:
[github]
user = kamilski81
token = *********
Any idea how I can stop it asking me for credentials and remember everything, does the new owner have to setup my ssh keys or something of that sort?
Following this article sorted it out for me:
https://help.github.com/articles/why-is-git-always-asking-for-my-password
git remote set-url origin git#github.com:user/repo.git
The github username and token in the gitconfig is only used for interactions with the GitHub API (for instance the hub gem and the github tool).
If you are pushing and pulling from a GitHub repository over https, then you need to specify your credentials every time, or hook into a password manager to remember the credentials for you. How to do this depends on your platform.
The easiest thing to do is to go to your github account and submit your SSH public key to your account, and then switch your github remote to push/pull over ssh instead of https.
[edit] After re-reading the question I noticed that you mentioned it was previously a GitHub repo that was just moved from one owner to another. If that's the case, and you ARE able to push and pull by specifying your credentials, it sounds to me to be one of two scenarios:
The previous remote used ssh, and GitHub has your SSH key; but when the owner changed and you updated the remote, you updated it to go over https.
The previous remote used https, but you had a password manager setup correctly to deal with your credentials, which no longer works.
After doing "remote -v"....the issue was that my remote was using an "https" remote rather than "git" remote. Changing the remote to use git rather than https solved everything.
If you execute only once git pull and Git client still asking you the credential without do the git pull for you, the problem should be because your credential is incorrect or not setup yet.
but if you get the dialog ask for credential one for each operation, it mean that your credential isn't remembered. To do that, you may use Pageant to store your SSH private key, so, everytime you do something, it will retrieve your credential from Pageant instead to asking you.