GitKraken won't let me clone from a private repo on GitHub

狂风中的少年 提交于 2019-11-29 16:43:36

问题


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

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.


回答1:


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:

    • https://github.com/settings/connections/applications/a7557949433b7d282a76
    • You will see a list of your Organizations at the bottom. Click "Request access" if applicable.
    • If your Organization is not listed then you have other problems (are you using the correct GitHub user account? Are you a member of the Organization?)
    • This is what the page looks like for me:
  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:
    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.




回答2:


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").




回答3:


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.




回答4:


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.



来源:https://stackoverflow.com/questions/41945280/gitkraken-wont-let-me-clone-from-a-private-repo-on-github

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!