每次Git进行pull或者push是都要提示输入用户名和密码很麻烦,解决办法:
1.首先需要创建ssh公钥,具体办法请看,http://git.mydoc.io/?t=154712
2.在添加ssh公钥后,每次操作任然要进行账号密码输入,原因是,没有使用加密的通道进行传输
可进行查看:git remote -v
展示信息如下:
origin https://github.com/ijijni/cent.git (fetch)
origin https://github.com/ijijni/cent.git (push)
我们需要使用ssh的传输通道,先删除原来的远程地址:git remote rm origin
然后添加ssh地址:git remote add origin git@github.com:ijijni/cent.git
然后再试,就不用每次都输入密码了