简体   繁体   中英

Windows to Ubuntu git connection

I've set up a git server (and gitolite) on an Ubuntu machine at Amazon. I want to interact with this server on Windows. I've installed Git for Windows (the one that comes with Visual Studio Tools for Git), but trying to access the server ends in the bash prompt telling me "Permission Denied (publickey)." I have the ssh keys from the git user on my local machine and Pageant has them loaded, but I don't see any way of telling the git client to use them. How do I tell the git command line to use my ssh keys?

Or better yet, does anyone have experience setting up Visual Studio Tools for Git to access their own personal git server rather than one at GitHub?

Ok, so turns out there is a seemingly undocumented step required to set the private keys for Git for Windows.

When Git for Windows is installed, it creates a new folder, C:\\Users\\[user]\\.ssh . In order to set the keys to use for ssh you must copy for private ssh key for the git user to this directory and it *MUST be named "id_rsa"* . Once you have that key in that folder, you're golden.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM