[英]git error “could not lock config file .git/config permission denied”
I'm developing on aws ec2, and installed git flow. 我正在使用AWS EC2进行开发,并安装了git flow。 And I commanded
我命令
git flow init
Then, error happened. 然后,发生了错误。
Which branch should be used for bringing forth production releases?
- master
Branch name for production releases: [master] master
error: could not lock config file .git/config: permission denied
Branch name for "next release" development: [develop]
error: could not lock config file .git/config: permission denied
fatal: Unable to create '/var/www/html/dev1/tomato/.git/index.lock': permission denied
How to name your supporting branch prefixes?
Feature branches? [feature/]
error: could not lock config file .git/config: permission denied
Release branches? [release/]
error: could not lock config file .git/config: permission denied
Hotfix branches? [hotfix/]
error: could not lock config file .git/config: permission denied
Support branches? [support/]
error: could not lock config file .git/config: permission denied
Version tag prefix? []
error: could not lock config file .git/config: permission denied
Why I cannot success to git flow init?? 为什么我无法成功进行git flow init?
Check if you have an %HOME% environment variable defined. 检查是否定义了%HOME%环境变量。
If that variable exists and refers to H:\\ (instead of %USERPROFILE%), then it will look for the global git config file in H:.gitconfig (meaning %HOME%.gitconfig). 如果该变量存在并指向H:\\(而不是%USERPROFILE%),则它将在H:.gitconfig(意味着%HOME%.gitconfig)中查找全局git配置文件。
Changing that %HOME% variable to a local path like %USERPROFILE% would solve that issue. 将该%HOME%变量更改为本地路径(如%USERPROFILE%)将解决该问题。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.