Sourcetree避免二次密码验证

1. 进入项目目录

执行下述命令

git config --global credential.helper osxkeychain

2. 异常

2.1 error:did you mean--global(with two dashes?)

记住 --global 一定写成 --(两个-)

2.2 不能执行,请先安装
$ git credential-osxkeychain
# Test for the cred helper
  git: 'credential-osxkeychain' is not a git command. See 'git --help'.
$ curl -s -O \
  https://github-media-downloads.s3.amazonaws.com/osx/git-credential-osxkeychain
# Download the helper
$ chmod u+x git-credential-osxkeychain
# Fix the permissions on the file so it can be run
$ sudo mv git-credential-osxkeychain \
  "$(dirname $(which git))/git-credential-osxkeychain"
# Move the helper to the path where git is installed
  Password: [enter your password]
$  git config --global credential.helper osxkeychain
# Set git to use the osxkeychain credential helper

原文CSDN:https://blog.csdn.net/qq_19484963/article/details/79026512

你可能感兴趣的:(Sourcetree避免二次密码验证)