GIt -- Window下配置 git
全局配置
但是在window終端上ssh命令不能用,只能在Git安裝目錄下的打開git-bash.exe操作,步驟如下:
Git安裝目錄下,
找到?git-bash.exe
?輸入:ssh-keygen -t rsa -C "email@xx.com"
Administrator /
$ ssh-keygen -t rsa -C "email@xx.com"
Generating public/private rsa key pair.
Enter file in which to save the key (/c/Users/Administrator/.ssh/id_rsa): ?這里需要你輸入一個密碼(默認直接輸入id_rsa文件名,或是直接回車),到會連接github需要用到
Enter passphrase (empty for no passphrase):
Enter same passphrase again:
Passphrases do not match. Try again.
Enter passphrase (empty for no passphrase):
Enter same passphrase again:
Your identification has been saved in /c/Users/Administrator/.ssh/id_rsa.
Your public key has been saved in /c/Users/Administrator/.ssh/id_rsa.pub.
然后到你的GIthub上創建ssh
?
然后再git-bush.exe,上輸入以下命令:
# ssh git@github.com
然后 ,會出現?Enter passphrase for key '/c/Users/Administrator/.ssh/id_rsa':
叫你輸入剛才生成sshkey 時,你輸入的那個密碼(我的是填id_rsa)
出現以下情況,表示連接成功。
?
轉載于:https://www.cnblogs.com/smallyi/p/8371319.html
總結
以上是生活随笔為你收集整理的GIt -- Window下配置 git的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: 送给前端开发者的一份新年礼物
- 下一篇: mongo04---基本查询