简体   繁体   English

git错误“无法锁定配置文件.git / config权限被拒绝”

[英]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.

相关问题 错误的错误消息“无法锁定配置文件.git / config:权限被拒绝”,原因是未进行分阶段的更改; 在安装openJDK 8时在Homebrew中 - error of “could not lock config file .git/config: Permission denied” due to unstaged changes; in Homebrew while installing openJDK 8 git:无法锁定配置文件权限被拒绝和无效参数 - git: could not lock config file Permission denied & Invalid argument 错误:无法锁定配置文件 C:/Program Files/Git/mingw64/etc/gitconfig:权限被拒绝 - error: could not lock config file C:/Program Files/Git/mingw64/etc/gitconfig: Permission denied 错误:无法锁定配置文件 C:/Program Files/Git/mingw64/etc/.gitconfig: Permission denied - error: could not lock config file C:/Program Files/Git/mingw64/etc/.gitconfig: Permission denied 错误:无法锁定配置文件.git/config:没有这样的文件或目录 - error: could not lock config file .git/config: No such file or directory 错误:无法锁定配置文件 /etc/gitconfig:权限被拒绝 - error: could not lock config file /etc/gitconfig: Permission denied git submodules - 错误:无法锁定配置文件 .git/modules/path/to/vimlib/config:没有这样的文件或目录 - git submodules - error: could not lock config file .git/modules/path/to/vimlib/config: No such file or directory SVN到GIT存储库的迁移,错误:无法锁定配置/元数据文件 - SVN to GIT repositories migration, Error : could not lock the config / metadata file 打开.git / config:权限被拒绝 - opening .git/config : Permission denied .config/git/ignore':权限被拒绝 - .config/git/ignore': Permission denied
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM