![](/img/trans.png)
[英]error of “could not lock config file .git/config: Permission denied” due to unstaged changes; in Homebrew while installing openJDK 8
[英]git error “could not lock config file .git/config permission denied”
我正在使用AWS EC2進行開發,並安裝了git flow。 我命令
git flow init
然后,發生了錯誤。
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
為什么我無法成功進行git flow init?
檢查是否定義了%HOME%環境變量。
如果該變量存在並指向H:\\(而不是%USERPROFILE%),則它將在H:.gitconfig(意味着%HOME%.gitconfig)中查找全局git配置文件。
將該%HOME%變量更改為本地路徑(如%USERPROFILE%)將解決該問題。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.