当前位置:   article > 正文

解决mac 下的 命令或Sourcetree 每次拉取提交都需要输入密码_error: did you mean `--global` (with two dashes)?

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

爱阅读很棒的看小说网站: http://www.aiyuedu.xin/

废话不多说干就完了

切换到你的项目的目录执行:

git config --global credential.helper osxkeychain 

如果遇到执行错误   error:did you mean`--global`(with two dashes?)

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

 

如果不能执行,请先安装:

  1. $ git credential-osxkeychain
  2. # Test for the cred helper
  3. git: 'credential-osxkeychain' is not a git command. See 'git --help'.
  4. $ curl -s -O \
  5. https://github-media-downloads.s3.amazonaws.com/osx/git-credential-osxkeychain
  6. # Download the helper
  7. $ chmod u+x git-credential-osxkeychain
  8. # Fix the permissions on the file so it can be run
  9. $ sudo mv git-credential-osxkeychain \
  10. "$(dirname $(which git))/git-credential-osxkeychain"
  11. # Move the helper to the path where git is installed
  12. Password: [enter your password]
  13. $ git config --global credential.helper osxkeychain
  14. # Set git to use the osxkeychain credential helper
声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/小丑西瓜9/article/detail/207915
推荐阅读
相关标签
  

闽ICP备14008679号