赞
踩
由于提交代码每次输入用户名和密码,很繁琐,所以直接配置 SSH Key,直接自动验证,减少提交代码的操作步骤。
git config --list 查看当前Git环境所有配置,还可以配置一些命令别名之类的。
core.symlinks=false
core.autocrlf=true
core.fscache=true
color.diff=auto
color.status=auto
color.branch=auto
color.interactive=true
help.format=html
rebase.autosquash=true
http.sslcainfo=D:/git/Git/mingw64/ssl/certs/ca-bundle.crt
diff.astextplain.textconv=astextplain
filter.lfs.clean=git-lfs clean -- %f
filter.lfs.smudge=git-lfs smudge -- %f
filter.lfs.required=true
filter.lfs.process=git-lfs filter-process
credential.helper=manager
user.name=Rattenking
user.email=1148063373@qq.com
alias.co=checkout
alias.ci=commit
alias.st=status
alias.pl=pull
alias.ps=push
:...skipping...
core.symlinks=false
core.autocrlf=true
core.fscache=true
color.diff=auto
color.status=auto
color.branch=auto
color.interactive=true
help.format=html
rebase.autosquash=true
http.sslcainfo=D:/git/Git/mingw64/ssl/certs/ca-bundle.crt
diff.astextplain.textconv=astextplain
filter.lfs.clean=git-lfs clean -- %f
filter.lfs.smudge=git-lfs smudge -- %f
filter.lfs.required=true
filter.lfs.process=git-lfs filter-process
credential.helper=manager
user.name=Rattenking
user.email=1148063373@qq.com
alias.co=checkout
alias.ci=commit
alias.st=status
alias.pl=pull
alias.ps=push
alias.df=diff
alias.lg=log
alias.cp=cherry-pick
alias.ca=commit -a
alias.br=branch
alias.mg=merge
git config --global user.name "xxx"
git config --global user.email "xxx"
cd ~/.ssh
ls
或
ll
由于我之前没有配置 SSH Key,所以不存在 id_rsa 和 id_rsa.pub文件,如果存在,说明已经有SSH Key。
ssh-keygen -t rsa -C "xxx"
注意:保存文件的名字输入 id_rsa!!!
cat id_rsa.pub
将第七步中的【ssh-rsa开头】密钥拷贝输入!!!
ssh -T git@github.com
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。