43

I'm using GitKraken (v. 1.4.1) as my Git managing tool. And now I want to use Github as a remote to back up my repos. But when I click on add remote and try to add a Github repo, it just says 'no match'

Gitkraken w/o Github

Does anybody know why this happens? (BTW: I'm using Windows 10, just in case that's relevant)

Jamie-505
  • 1,170
  • 1
  • 12
  • 16
  • 2
    The GitHub.com option is for adding forks of the project as the 2nd, 3rd, etc. remotes, so that activity in the forks can be seen in the commit graph. For adding the initial 1st remote, you use the URL option. See more detailed answer below. – Jim Meyer Dec 20 '16 at 03:00
  • Note: the latest (January 2020) GitKraken 6.5 can be of interest: see my [edited answer below](https://stackoverflow.com/a/37760430/6309). – VonC Jan 31 '20 at 17:53

4 Answers4

35

Here's how it seems to work. If you have a local repo and want to connect it to github, you would use the "URL" option and put in the github address to set that as the remote repo for your local repo. The first time you do a pull or push on a local branch, it will ask which remote branch you want to use and that becomes the remote location to which you will pushing and pulling changes.

The GitHub.com option only comes into play after you have set the remote repo using the "URL" option. If there are multiple collaborators on a project and someone has created one or more forks of the project, then instead of "No Match" under the GitHub.com, you would see a list of all the forks of the project on which you are a collaborator.

You could then add the forked repos as the 2nd, 3rd, etc. remotes, and any activity on those forks would be displayed to you on the commit graph. This allows people to see what's going on in the forks, and you can drag and drop from the forked parts of the graph to create pull requests to the repo you first set up using "URL".

It's a nice feature, but the remote dialog could be labelled more clearly so that people would know the GitHub.com option was for adding forked repos to the commit graph display.

You must always use the "URL" option to add the 1st remote, and then the GitHub.com option only becomes available after that if there are forks to which you have access.

Jim Meyer
  • 9,275
  • 1
  • 24
  • 49
  • 8
    It would be nice if GitKraken led the user through those steps. As it stands, if I have a github account that's already set up and authenticated in the app, why would I not assume I should just immediately click on the GitHub.com icon to work with my account? – Max Wilder Apr 20 '17 at 20:13
9

If GitHub is set with your account in GitKraken, you might need to create first an empty repo with the same name as your local repo.

That way, GitKraken can find a matching repo name in your GitHub account.

Or you could select "URL", and enter the right GitHub repo url directly there. Which is what Jim Meyer's answer confirms above.


Note that GitKraken 6.5 (January 2020) will create, then add a GitHub fork repo automatically!

Forking GitHub Repositories in GitKraken

Formerly, users were required to leave GitKraken, go to their hosting service, fork the desired repository, come back to GitKraken, find the related remote, and then find the forked repo.

Now, GitHub users can fork repositories directly through the GitKraken GUI, no more time wasted context switching.

v6.5 allows users the ability to fork GitHub repositories in GitKraken through the GitHub integration.
Simply navigate to the remotes pane in the left panel and click the + button to add a remote.

If you don’t already have a fork on the selected GitHub repository, GitKraken will automatically present you with the fork option.
You will see the message “You have not yet forked microsoft/vscode on GitHub.

Click the Fork and Add Remote button, and it will fork the repo and add it as a remote to the left panel.

fork repo in GitKraken -- https://blog.axosoft.com/wp-content/uploads/2020/01/fork-half.gif

VonC
  • 1,262,500
  • 529
  • 4,410
  • 5,250
  • even creating a empty Github repo with the same name as my local repo wouldn't list it in GitKraken. But creating a Github repo (any name) and setting the remote via the URL did the trick. The weird thing is, I already tried this last night and GitKraken wouldn't let me klick "Add Remote", but today it worked. – Jamie-505 Jun 11 '16 at 14:25
  • I am getting similar behavior to you. Unfortunately, when I add the url (https://github.com/FarrelBuch/FirstGitKraken.git) I am getting notices about malformed URL and it will not workl – Farrel Sep 20 '16 at 05:30
  • @Farrel What version of GitKraken are you using? Is the field expecting an https or ssh url? – VonC Sep 20 '16 at 05:53
  • I am using the latest version which is 1.6.1. I actually pasted `https://github.com/FarrelBuch/FirstGitKraken.git` – Farrel Sep 20 '16 at 06:18
  • 1
    @Farrel Did you paste it in the url section or, as in the screenshot of the question, in the name section? (in which case, only `FirstGitKraken` should be entered) – VonC Sep 20 '16 at 06:19
  • Yes, I typed `FirstGitKraken` in the name section and put `https://github.com/FarrelBuch/FirstGitKraken.git` in the push and pull URL boxes. – Farrel Sep 20 '16 at 06:21
  • @Farrel could you try only the url part? (without name in the Name part) – VonC Sep 20 '16 at 06:23
  • @Farrel Since GitKraken 1.6.0 introduced GitHub login, did you log in with your GitHub account in GitKraken? – VonC Sep 20 '16 at 06:36
  • Let us [continue this discussion in chat](http://chat.stackoverflow.com/rooms/123808/discussion-between-farrel-and-vonc). – Farrel Sep 20 '16 at 17:47
  • @VonC did you see that I went to chat as StackOverflow suggested. – Farrel Sep 22 '16 at 21:41
  • @Farrel Yes, sorry, during work day, I don't have access to chat. – VonC Sep 22 '16 at 21:43
  • this is wrong. having the same name is not enough to cause gitkraken to recognize the remote and add it to the list. tested and retested to confirm. – roberto tomás Apr 16 '17 at 15:21
  • Thanks for the tip. This part of GitKraken has been **nonfunctional** for years now. Yes, that's right - YEARS. There's so much effort by the company to push Glo on us, but no effort to fix some broken UX interactions. Simple UX interactions, too. – code4life Dec 25 '18 at 18:51
1

Gitkraken (V3.3.4 64bits on windows) behaviour is strange at this feature level. Same name or URL input doesn't work for me. So the best and quick way to attach the remote repo to your local is to use the simple Git command line in local repo directory (git@... is your remote URL Github, GitLab...):

> git remote add origin git@...

Gitkraken recognise dynamically it after less than 5 second . Then you can push your existing local files.

E.Racineux
  • 88
  • 5
0

Not to add to an old posting but I had the same issue and found this article first so wanted to help anyone else having this issue.

You can get to it by doing the following.

  1. Click the folder icon in the top left corner

  2. Click Clone

  3. Go to the GitHub tab and you will see all your GitHub repos. Clone the one you want and then open it and you are set.

Tyler C
  • 573
  • 5
  • 17
  • Best answer, this works with BitBucket too (I'm mentioning this for people googling their way to this answer like I just did). – otravers Nov 08 '16 at 22:19
  • 6
    This doesn't answer the question. This answer describes how to get a remote repo into Git Kraken, not the other way around... – iikkoo Nov 28 '16 at 15:49
  • This doesn't work for me. I get "projectName already exists and is not an empty directory"?? – hipkiss Jan 08 '17 at 17:00
  • 1
    this is correct but does not answer the question. instead, it answers the related question: "if I already have a github repo initialized, how can I clone and start working on it locally?" – roberto tomás Apr 16 '17 at 15:25