How to link Smartgit to GitHub
Asked Answered
L

2

16

I have a public GitHub account for the last year or so. Yesterday I installed SmartGit on my Windows 7 PC. SmartGit works fine locally but I'd like to push to a remote repo on GitHub.

When I look at SmartGit -> Preferences -> Authentication I have selected to use SmartGit as SSH Client. The 'Known Credentials' area is empty. Under Hosting Providers I have added my github account [username+password] and Clicking on 'Login at GitHub...' it opens the browser and I am logged in successfully.

I would have assumed there would be something populating the Known Credentials area? I tried in vain in see if I had some key-pair stored somewhere that SmartGit could use. Eventually I downloaded PuttyGen and created a pair of keys. I gave them silly names to begin with but after some reading renamed them to *id_rsa* and "id_rsa.pub" and dropped them into my c:\users\MYNAME.ssh directory.

Still no sign of any credentials in SmartGit.

When I run the 'Remote -> Manage Remotes -> Add I enter the git name (based on the link I get from the github repo. I get the "Provide Credentials for authenticating to the SSH Server 'github.com' as user 'git'. The dialog box has pre-populated the Private Key File with the id_rsa I dropped into the .ss directory.

I even went onto github and added this key to the list of SSH keys. Still no joy.

Anyone any suggestions ?

Labelle answered 26/5, 2012 at 17:27 Comment(1)
Did you tried to clone your GitHub repository? SmartGit will then ask you for your private key file and its passphrase.Unthinking
S
7

Assuming it works similar on github and bitbucket. Today I got Smartgit 3.0.10 running with bitbucket by the following steps:

To upload local code

1) Created the repository in bitbucket manually through the website

2) Add your ssh key to the website ( PuttyGen > Conversions > Export OpenSSH )

3) In your local repos check the contents of reposDir.hg\hgrc , should look like

[paths] 
default = ssh://[email protected]/user123/reposXYZ

if not change it manually. You can also clone your empty repos and the check in the local copy for this line.

Restart SmartGit and you should be able to push and pull.

Subscapular answered 9/10, 2012 at 22:17 Comment(1)
I've just met a similar issue, (2) is the key point, SmartGitHg's ssh client seems to not understand the key generated by putty.Lonnie
S
3

If you use the "HTTPS clone URL" on github, it makes a link that requires no SSH keys. These 2 articles explain it: https://help.github.com/articles/which-remote-url-should-i-use https://help.github.com/articles/generating-ssh-keys

Shade answered 21/11, 2013 at 10:29 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.