Using Github for Windows to work with own private Git through SSH
Asked Answered
A

4

21

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.

Alveolate answered 22/6, 2012 at 23:35 Comment(0)
M
14

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!!)

Mildew answered 22/6, 2012 at 23:51 Comment(2)
They should really fix that one out since it is a pretty important feature IMHO. It worked perfectly, the only adjust I had to make in order to make it work wih SSH connections was to add my private key through ssh-add (though right now it does not support passphrase) and It worked like a charm. Thanks a lot :D !Alveolate
When I follow these steps I don't get a prompt to enter username and password, thus it fails to sync. Any advice on how to get it to prompt for password and username?Regelation
B
5

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.

Battleplane answered 27/8, 2015 at 14:10 Comment(1)
As of Jan 2017, the RSAAuthentication config is deprecated pkg-ssh/openssh commitGingerly
A
2

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.

Abnormality answered 24/8, 2013 at 23:5 Comment(0)
A
1

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à.

Asbestos answered 28/3, 2017 at 16:37 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.