scm-notifier icon indicating copy to clipboard operation
scm-notifier copied to clipboard

Can scm-notifier support Git Bash?

Open victorwoo opened this issue 13 years ago • 9 comments

scm-notifier use git.exe directly to resolve the repo's address. But in Git Bash, a ssh path can be defined by this form:

vi ~/.ssh/config

host rdserver_bak user git hostname rdserver.itep.com.cn port 22 identityfile ~/.ssh/wub

SmartGit supports this form, will scm-notifier support, too?

victorwoo avatar Aug 11 '12 05:08 victorwoo

Sorry, I don't know much about Git Bash. Could you explain more about why and when do you need alternative path form?

pocorall avatar Aug 15 '12 20:08 pocorall

you can type "git help clone" to see the help document:

Git natively supports ssh, git, http, https, ftp, ftps, and rsync protocols. The following syntaxes may be used with them: ssh://[user@]host.xz[:port]/path/to/repo.git/ ... An alternative scp-like syntax may also be used with the ssh protocol: [user@]host.xz:path/to/repo.git/

scp-like syntax allows us to create a alias to the physical "host:port" via configing ~/.ssh/config Btw, can you read Chinese? Please read this article http://blog.csdn.net/ppby2002/article/details/6549756

victorwoo avatar Aug 17 '12 09:08 victorwoo

OK, As I understand, git bash is required especially when we want to authenticate using unix style(~/.ssh/config), right?

After a short survey, I found how to access "git bash" within a windows command line:

"C:(path-to-git)\bin\sh" --login -i -c "exec git (arguments...)"

Is there a better way for access it?

p.s. I can't read Chinese. sorry :-D

pocorall avatar Aug 18 '12 03:08 pocorall

My "Git Bash.lnk" points to the following path: C:\Windows\SysWOW64\cmd.exe /c ""C:\Program Files (x86)\Git\bin\sh.exe" --login -i" Will scm-notifier detect and automaticlly config to use this command ?

victorwoo avatar Nov 08 '12 12:11 victorwoo

OK, I will test git bash configuration. It may takes few weeks. For now, please use TortoiseGit conf.

http://serverfault.com/questions/194567/how-to-i-tell-git-for-windows-where-to-find-my-private-rsa-key

pocorall avatar Nov 16 '12 06:11 pocorall

My enviroment:

  • With Git-1.8.0-preview20121022.exe installed
  • Without any TortoiseGit installed.
  • Use ~.ssh\config (Git Bash path) to indicate where the private key locates
  • Use ~.ssh\config (Git Bash path) to define host alias for repos
  • repo is cloned in Git Bash by using private key and host alias defined in ~.ssh\config

The ~.ssh\config is like this:

host rdserver
        user git
        hostname rdserver.itep.com.cn
        port 22
        identityfile ~/.ssh/wub

BUT, I've tested git pull commands in pure cmd.exe, and it is successful. So, It seems not necessary to call Git Bash command (C:\Windows\SysWOW64\cmd.exe /c ""C:\Program Files (x86)\Git\bin\sh.exe" --login -i") to do git operations. Can scm-notifier try to call git.exe (included in msysgit) directly without calling Git Bash or TortoiseGit?

victorwoo avatar Nov 19 '12 03:11 victorwoo

Thank you for your configuration information. I'm going to check out whether scm-notifier can work without TortoiseGit, which is intensively accessed by the current version of scm-notifier.

pocorall avatar Nov 24 '12 03:11 pocorall

I was just about to ask this, I just yesterday uninstalled TortoiseGit because it was always Caching repos in the background, so when I was trying to delete them, there was locks on the folder. (Very annoying).

WORMSS avatar Aug 07 '13 08:08 WORMSS

@WORMSS You can easily disable that in the settings. Settings -> Icon Overlays -> Status cache -> none.

ghost avatar Aug 07 '13 14:08 ghost