19
votes

Right now, I'm using msysgit to work with my own private repositories stored on a ec2 Amazon Cloud Server using SSH.

Until now, I've been able to successfully connect to those repositories through Git Bash (creating the ssh-rsa public and private key with ssh-keygen, adding the public key to the authorized_servers on the remote machine), so I can clone, push, pull, get through the CLI.

Now, I've seen Github for Windows, and I gotta say, it is a beautiful piece of software. Since it is based on msysgit, I was wondering that if it is possible to setup Github for Windows to connect, clone and push commits through the UI?

In the description it looks like possible, but the documentation seems to lacks information about what the software is capable to do.

Hope you can help me out here, cheers from Mexico.

4

4 Answers

14
votes

Here is a nice write up of what you are exactly looking for.

Edit: I just tested with the following steps and it works like charm!!

   1. Click on repositories on the left.
   2. Pull your copy of the repo from the remote , using git-shell
   3. Drag and drop the Folder on to Git hub for windows dashboard.
   4. now double click on the repository dropped on to githubW. It should be listed as a local repository.
   5. it says login required to your non-github remote!

enter image description here

Credits

For some wierd reason, GutHub didn't make it straightforward to use non-GitHub Remotes. (As you said, they say that they support non-github remotes though!!)

5
votes

Late answer but this is how I did it for using Gitlab.com through SSH on Github for windows.

  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.

2
votes

Since GitHub for Windows also work with https url, note that since August 2013, you also can use an OAuth tokens for authentication.
See "Better password security in GitHub for Windows"

Prior to this release the application would encrypt and store your password. Since the application also registers itself as your Git credential provider, the app would provide your credentials in clear text to Git.exe whenever it asked for them.

With this release, when you log in with your username and password, the application registers itself on GitHub.com as an Authorized application and receives an OAuth token that it stores instead of your password. This is similar to how other applications that integrate with GitHub work such as Travis-CI.

1
votes

It is pretty wierd but the only solution is to drag and drop the URL of the repository into Github for Windows. It will then ask you for your name and password for the cusom Git (private, Lab or else)... and voilĂ .