Author Topic: GIT SSH Configuration  (Read 2690 times)

tborland

  • Junior Community Member
  • Posts: 7
  • Hero Points: 0
GIT SSH Configuration
« on: November 26, 2019, 06:04:17 PM »
This may not be the proper place for this but asking hoping that either someone can answer or direct me down the right path.

I have the GIT integration working with SlickEdit but I am unable to do anything with my remote repo. Our corporate GIT setup uses an SSH key that, when I use GIT Bash, I have to enter my SSH key passphrase every time I want to access the remote server. Whenever I try to do anything with the remote repo from SlickEdit I get an error, I do not get prompted for my passphrase. First off I am wondering how to get SlickEdit configured to use my SSH key and secondly if there is a way to store my passphrase so that I do not need to enter it every time.

b

  • Senior Community Member
  • Posts: 325
  • Hero Points: 26
Re: GIT SSH Configuration
« Reply #1 on: November 26, 2019, 06:45:06 PM »

What platform are you using?


If you are using Linux, look into ssh-agent or the equivalent for your desktop.    If ssh-agent is run ahead of your windowing desktop when you log in, you can then add your ssh key(s) to the agent via ssh-add.   Once added, all sessions will use the agent for authentication (e.g., the ssh call made by slickedit).


https://duckduckgo.com/?q=ssh+keys+linux+desktop&atb=v123-6__&ia=web



If you are using Windows, then you probably are using Cygwin's version, or possibly MSYS.   Depending upon your Windows configuration, it can be a bit trickier.   If you configure Cygwin's ssh to use PuTTY's agent, you can launch pagent and load your key(s).   If you are using the standard Cygwin, you may need figure out how to launch ssh-agent (from it's own environment, and play around with trying to set environment variables such that SE's call to ssh has access to be able to find the agent.


https://duckduckgo.com/?q=cygwin+ssh+pagent&atb=v123-6__&ia=software




tborland

  • Junior Community Member
  • Posts: 7
  • Hero Points: 0
Re: GIT SSH Configuration
« Reply #2 on: November 26, 2019, 06:48:01 PM »
Thanks for the information!

I am using Windows and Cygwin. I do have pagent installed so I'll have to dig into how to launch it with Cygwin.

Thanks for the shove in the right direction!

b

  • Senior Community Member
  • Posts: 325
  • Hero Points: 26
Re: GIT SSH Configuration
« Reply #3 on: November 26, 2019, 07:35:09 PM »

Unfortunately, Cygwin is the most painful to work with.   I would recommend either Git Bash or MinGW-W64+MSYS as an alternative since they have a direct means of integrating with PuTTY's pagent (thus allowing Windows wide access).    I have both Cygwin and MinGW-W64+MSYS installed on my machine and use the latter for my remote & X windowing environment and the former for corporate local builds.   I have used Git Bash on previous worksites and that works well, too.   Something else to look at (although it may be locked down/prevented as it is a bit of a security risk) is WSL.


[edited to add useful links]
http://blog.davidegrayson.com/2013/04/git-and-putty-in-windows.html
https://rperki.blogspot.com/2014/09/configure-mingw-w64msys-to-use-putty.html

« Last Edit: November 26, 2019, 07:41:17 PM by b »

tborland

  • Junior Community Member
  • Posts: 7
  • Hero Points: 0
Re: GIT SSH Configuration
« Reply #4 on: November 26, 2019, 09:28:16 PM »
As luck would have it, I messed up on what we are using in our corporate image.

However I'm a bit confused as when I right click to open a shell it says "GIT Bash" but the window title is MINGW64. Are these functionally the same or is the configuration "lying" to me that it's "GIT Bash?"

Thanks TONS because I realize this is completely outside of SlickEdit!

Dan

  • SlickEdit Team Member
  • Senior Community Member
  • *
  • Posts: 2899
  • Hero Points: 153
Re: GIT SSH Configuration
« Reply #5 on: November 26, 2019, 10:16:06 PM »
The one from Git seems to set some environment variables.

b

  • Senior Community Member
  • Posts: 325
  • Hero Points: 26
Re: GIT SSH Configuration
« Reply #6 on: November 27, 2019, 04:38:54 PM »
As luck would have it, I messed up on what we are using in our corporate image.

However I'm a bit confused as when I right click to open a shell it says "GIT Bash" but the window title is MINGW64. Are these functionally the same or is the configuration "lying" to me that it's "GIT Bash?"

Thanks TONS because I realize this is completely outside of SlickEdit!



GIT Bash uses MINGW64 core (and specifically the MinTTY for the terminal).   It is just tailored for the git environment and plays a bit nicer than Cygwin.