Does GitHub for Windows work with GitLab?
Asked Answered
H

6

90

While working on a project using GitHub I've fallen in love with GitHub for Windows as a client. Now a new project beckons where I'll be using GitLab instead of GitHub.

Will I still be able to use GitHub for Windows as a client for GitLab? After all, they're both based on git, right? If not, what clients are available for GitLab?

Hasp answered 25/3, 2014 at 15:54 Comment(0)
S
78

Yes, you can use the Windows GitHub client and the GitHub Desktop client with GitLab, BitBucket or any other hosted Git solution.

We only use it with HTTPS and you'll need a valid certificate if you do use HTTPS. It may work with HTTP as well. We never did get SSH to work completely right since it's a tough to inject your own SSH keys into the application.

If you want to clone a repository, you have to drag and drop the HTTP URL onto the GitHub application.

I was unable to get the drag and drop trick to work on OS X. But you can add locally cloned repositories into the OSX version and then the application works like normal. And OSX supports SSH keys unlike the Windows version.

Schopenhauerism answered 25/3, 2014 at 15:57 Comment(5)
Is there any way to do this for private/internal repos? I can't seem to figure it out.Tripoli
@Rev Yep. Internally hosted repos are supported. You'll need to highlight the clone URL for your internal repository and drag the actual text onto the Github for Windows application to clone. Or you can drag a folder of an already cloned repository onto the Github for Windows application to be added to the application.Schopenhauerism
Thanks, I got it working with BitBucket, but I think there's something goofy with my GitLab API (it's a fresh install). I'll look in to it.Tripoli
Github for Windows (GfW) wanted Gitlab credentials while trying to clone my Gitlab repo (via HTTP URL). I used GitHub OAUTH2 to initially login to Gitlab, so I didn't /have/ a Gitlab password to give GfW. I logged out of the Gitlab site and proceeded with the Forgot Password feature of the site. This resulted in my having a Gitlab password for my Gitlab account, which I then gave to GfW, which cloned the repo w/o problem. At this point, I'm syncing successfully in both directions, and I'm able to login to Gitlab using either GitHub OAUTH2 creds or via the Gitlab password created later. Yay. :)Abott
That is very odd you can't paste in a URL, but can drag it into the app. I would never have figured that out without finding this answer.Tempt
R
37

Yes you can use GitHub For Windows with GitLab, You can even use SSH. (The accepted answer didn't get SSH working, but here is how you get it working.)

  1. Add your public ssh key from github_rsa.pub (which is found in your .ssh folder) to your SSH keys on Gitlab.com
  2. Add a config file to your .ssh folder that looks like this

    Host gitlab.com
    RSAAuthentication yes
    IdentityFile ~/.ssh/github_rsa
    User mygitlabloginemail
    
  3. Clone / pull your repository through Git Bash

  4. Drag the folder to Github For Windows

And thats it, you can now use Github for Windows with your gitlab repository.

Regalia answered 29/7, 2016 at 8:57 Comment(2)
Not sure what I was doing, but I had to change github_rsa to id_rsa to clone the repo.Birdman
This will work for other local GitLab installations -- change Host, IdentityFile name, and email as neededWanigan
W
8

The answer is YES. You can use GitHub for Windows on GitLab. And not just on Gitlab, you can use it for repositories on Bitbucket as well.

Wondawonder answered 25/3, 2014 at 15:57 Comment(1)
Thanks, sachinjain024. Your answer would be more useful if you mentioned how to do so -- particularly for Bitbucket if it is not like @Deb's answer.Wanigan
A
3

The GitHub for Windows application allows you to manually add and work with repositories from any remote location (ie GitLab/BitBucket...) or local location (your hard drive or network folder).

However, it only has the option to add your account info for GitHub. Whatever functionality that is tied to that account login will only work for GitHub. I am guessing that functionality is automatically recognizing all your GitHub repositories.

Autosuggestion answered 6/6, 2015 at 20:57 Comment(0)
P
1

I use it with GitLab all the time.

I Clone the Repo from Terminal then do all my commits, pushes and pulls from the GitHub Desktop interface.

Photographer answered 31/12, 2015 at 15:48 Comment(0)
C
0

Yes, go to your Gitlab repo and copy HTTPS remote address of that repo then in Github-Desktop you can change the remote address to HTTPS one.

This is because Github-Desktop doesn't support SSH yet.

Clavius answered 5/10, 2017 at 7:1 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.