[英]how do i cache password for git on mac
I am following the instructions at https://help.github.com/articles/set-up-git . 我按照https://help.github.com/articles/set-up-git上的说明进行操作。 But when I get to the step 但是当我走到这一步时
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]
I keep getting errors for dirname
. 我一直在为dirname
收到错误。 dirname
is my /User/myname
directory. dirname
是我的/User/myname
目录。 so I try replacing it with /User/myname
, then with /
, then with .
所以我尝试用/User/myname
替换它,然后用/
,然后用.
. 。 Each time it throws a complaint such as 每次抛出投诉如
-bash: dirname: is a directory
mv: git-credential-osxkeychain: No such file or directory
Or in the case of .
或者在的情况下.
-bash: ????: command not found
mv: git-credential-osxkeychain: No such file or directory
But when I go to my HD
I do see the file git-credential-osxkeychain
there under path (ie info) /
但是当我转到我的HD
我确实在路径下看到了文件git-credential-osxkeychain
(即信息) /
You need to input the command 您需要输入命令
sudo mv git-credential-osxkeychain \
"$(dirname $(which git))/git-credential-osxkeychain"
exactly as it is written; 正如它所写的那样; don't replace dirname
with a directory name. 不要用目录名替换dirname
。 (The point of this command is to get your shell to do that replacement itself.) (这个命令的目的是让你的shell自己做替换。)
The password you're prompted for is your computer's password—the use of sudo
is what's triggering the password prompt here. 您提示输入的密码是您计算机的密码 - 使用sudo
是触发密码提示的原因。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.