41

I've tried cloning a private repo (that I have access to) on GitHub and get this message:

enter image description here

Clone Failed

Could not connect to 'origin'. Double-check your remote url, then make sure you have access to do that action on that remote and try again.

I run Windows 10, I have connected Kraken to GitHub and ssh key works and I can push and pull repos to my other GitHub repos that are public just fine. I was also able to clone the repo from the command line just fine.

Pang
  • 9,564
  • 146
  • 81
  • 122
flettl2
  • 411
  • 1
  • 4
  • 3

4 Answers4

67

For some reason, GitKraken does not use your existing HTTPS credentials to communicate with GitHub, nor does it use SSH on Windows. Instead it uses OAuth2, which means you need to grant OAuth2 access to GitKraken.

https://support.gitkraken.com/integrations/github
If no remotes or repositories are appearing in Add Remote or Clone, the likely cause is the need for an organization to allow access. GitKraken cannot see those repos when cloning or adding a fork unless the org specifically gives permission to GitKraken as an application.

  1. First check to see if access is allowed to GitKraken from GitHub Applications
  2. If access has been allowed, then the organization will need to allow Organization Approval
  3. For details about third-party application restrictions view Third-party apps list

These are the steps I took and they worked for me:

  1. You need to be an administrator in your GitHub Organization.
  2. Access the GitHub GitKraken Application page and request access:

  3. Approve of the Access you just requested:

    1. Access this page: https://github.com/organizations/YOUR_ORG_NAME/settings/oauth_application_policy
      • You can also access the page by going GitHub Settings > "Organization settings" > "Third-party access"
    2. This page looks like this: Screenshot of Organization Settings Third-party access
    3. This is not the same page as your "Personal settings" > "Authorized applications" page ( https://github.com/settings/applications )
    4. You should see GitKraken listed as requesting permission.
    5. Click the Approve link to grant it access.
  4. GitKraken should work now.

However, in my experience I don't reliably see the GitKraken request listed in the Requests list. I've contacted GitKraken Support for assistance.

Dai
  • 141,631
  • 28
  • 261
  • 374
  • They probably don't enable this by default as they want you to pay for the use of Github Enterprise accounts. – Sam Mar 16 '18 at 03:37
  • @LouysPatriceBessette The OP ( https://stackoverflow.com/users/7491863/flettl2 ) posted this one question in 2017 and never came back, so until they mark it as accepted it will forever be unaccepted. – Dai Aug 02 '21 at 20:44
31

You can use the "GitHub Enterprise" configuration instead of the "GitHub.com" configuration:

  • As the domain for your GitHub enterprise server just enter "GitHub.com".
  • Generate a personal access token.

This will work with all repos you have access to, even if the organization has not opted-in to allowing OAuth 2 apps to access them, and it works regardless of which version of GitKraken you're using (i.e. you don't need "Pro").

Dave P
  • 1,445
  • 2
  • 7
  • 6
Nicolas Garnier
  • 12,134
  • 2
  • 42
  • 39
  • 1
    Yes, only works with the pro version, but definitely worked for me. Thanks! – Craig Eddy Nov 21 '18 at 16:22
  • 1
    Thank you! This saves my day! (In my case, I could clone but could not fetch or push.) – Sean Yun-Shiuan Chuang Jan 26 '20 at 06:04
  • from within Gitkraken, you will be sent to github. copy the PAT that is generated into Gitkraken's text box and click Connect. then you can expect to interact with the repo. i'm also using the Pro version – rdamus Apr 16 '21 at 23:40
11

I had the same issue. I solved by disconnecting from my GitHub.com account in GitKraken. Then, when I tried to clone an organizational private repo, GitKraken asked me username and password. The repo was cloned successufuly.

enter image description here

Bruno De Freitas Barros
  • 2,199
  • 2
  • 17
  • 16
  • This did work for me. So you don't have to request your organization to give access to GitKraken. – javier-sanz Sep 25 '20 at 11:20
  • This only works if you're in the organization. If you're connecting to another organization's private repo, this is still blocked. – Will Strohl Nov 12 '20 at 03:35
1

The above answers are all correct, and granting access to your Github organization is still the recommended way to go if you want to take full advantage of GitKraken's features, but if your organization admins can't or won't grant access, Gitkraken supports SSH keys as well.

It'll only use them on existing repos if the URL of the remote is an SSH url (starts with ssh:), and it'll only clone over SSH if you allow it to generate its own SSH key. Go to Preferences > authentication > Github, and it should be able to clone any repo you have access to.

Chuck Dries
  • 1,630
  • 13
  • 19