TortoiseGit+msysgit 在[email protected] 上使用
不废话,分为使用ssh key 和https两种。
TortoiseGit+msysgit 安装都是一路下一步安装。
一,ssh key 方式
使用 ssh key连接只有只读。这个很简单,使用putty 生成key,然后先保存private.ppk。
再把公钥填写到[email protected]相应的项目里。
在一个空的文件夹上使用 git clone ,弹出如下对话框
Url那填写 ssh的路径
dirctory默认
load putty key 找到保存的private.ppk
点OK 就可以。
注意: 真的只能读取,不能提交的。
二,https连接方式
-
TortoiseGit 右键上选setting->git ,弹出的对话框直接点OK
点global,填写 name,emial
name 是随意的,你想在git代码的记录里显示谁谁更改了就填写什么,emial是什么我也不清楚,直接写[email protected]的那个email.
之后点应用,别急着关。
点击上图,取消键对上去的 Edit global .gitconfi按钮
在打开的文本里面写上
[credential]
helper = store
然后保存。
3. 点击左边树菜单上 git下面的 credential ,在helpers那有一个G, 点它,如下图
然后填写 项目的 https 的url到右边来,如 https://git.oschina.net/xxxxx/xxxxxx.git
UserName 填写你登陆的邮箱。 然后确定。
说明一下, helper的store参数是长期保存密码意思。
4. 使用 https 拉取项目的第一回要输入密码,后面获取提交都不用了。
^_^ 就这么简单,反正我看得懂了。
转载于:https://my.oschina.net/ITminggong/blog/366539