GitHub for Windows 与 GitLab 兼容吗?

在使用 GitHub 进行一个项目时,作为一个客户,我爱上了 GitHub for Windows。现在,一个新的项目正在召唤我,我将使用 GitLab 而不是 GitHub。

我仍然可以使用 GitHub for Windows 作为 GitLab 的客户端吗?毕竟,他们都是基于 Git 的,对吧?如果没有,GitLab 有哪些客户端可用?

100279 次浏览

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.

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.

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.

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.

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.

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.