由于SourceTree每次push和pull时都需要密码比较麻烦,所以可以直接采取保存密码的方式来解决。
解决方式一如下:
打开仓库->仓库设置->远程仓库,进行修改,如下图

这里写图片描述

将其中的url
比如:https://gitee.com/lanxuewei/blog.git
修改为:http://username:password@gitee.com/lanxuewei/blog.git
-即新增username:password@

username和password分别为你登录的用户名和密码。

解决方式二如下:
打开Mac终端,以下命令:

git config --global credential.helper osxkeychain

执行完毕后,在SourceTree上执行拉取或者推送命令,输入Mac的密码,始终允许SourceTree访问钥匙串即可

Logo

瓜分20万奖金 获得内推名额 丰厚实物奖励 易参与易上手

更多推荐