SSH based git access method can be specified in <repo_path>/.git/config using either a full URL or an SCP-like syntax, as specified in http://git-scm.com/docs/git-clone:
URL style: url = ssh://[user@]host.xz[:port]/path/to/repo.git/
SCP style: url = [user@]host.xz:path/to/repo.git/
Notice that the SCP style does not allow a direct port change, relying instead on an ssh_config host definition in your ~/.ssh/config such as:
Host my_git_host HostName git.some.host.org Port 24589 User not_a_root_user
Then you can test in a shell with:
ssh my_git_host
and alter your SCP-style URI in <repo_path>/.git/config as:
url = my_git_host:path/to/repo.git/
----------------------------------- ~/.ssh/config这个目录, windows下就是C:\Users\xxx\.ssh\下, xxx是你的windows用户名 config是一个文件,没有就自己建一个。 -------------------------------------- 另一个文章,貌似挺全的: http://guides.beanstalkapp.com/version-control/git-on-windows.html
|