用我的GitHub帐户错误设置git时遇到问题:无法锁定配置文件 [英] Trouble setting up git with my GitHub Account error: could not lock config file
本文介绍了用我的GitHub帐户错误设置git时遇到问题:无法锁定配置文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
在尝试设置全局配置时出现此错误:
$ git config --global user.name 你的名字在这里
错误:无法锁定配置文件/pathto/file/.gitconfig:没有这样的文件或目录
和文件.gitconfig已经存在,任何人都有任何想法?
解决方案
有点像使用我的GitHub帐户设置Tower时出错 - 错误:无法锁定配置文件,请检查〜/ .gitconfig
文件的创建方式。
Ie:与哪个相关的权利?
请确定您的 $ HOME
变量是否正确在执行 git config --global
命令时设置。
I'm getting this error when trying to set the global config:
$ git config --global user.name "Your Name Here"
error: could not lock config file /pathto/file/.gitconfig: No such file or directory
and the file .gitconfig is already exists, anyone have any ideas??
解决方案
A bit like in "Trouble setting up Tower with my GitHub Account - error: could not lock config file", check how that ~/.gitconfig
file has been created.
Ie: with which rights associated to it?
Make also sure your $HOME
variable is correctly set when you are executing the git config --global
command.
这篇关于用我的GitHub帐户错误设置git时遇到问题:无法锁定配置文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文