Error: could not lock config file.git/config: No authorization during git flow init on Git Flow

Asked 1 years ago, Updated 1 years ago, 38 views

Currently, we are developing on the EC2 of AWS.
Installing git flow and doing git flow init

[ec2-user@ip-xxx-xxx-xxx-xxx-xxx sample] $git flow init

Which branch should be used for ringing for production releases?
- master
Branch name for production releases: [master] master
error: could not lock config file.git/config —No authorization
Branch name for "next release" development: [develop] 
error: could not lock config file.git/config —No authorization
fatal:Unable to create '/var/www/html/dev1/tomato/.git/index.lock'—Not authorized

How to name your supporting branch prefixes?
Feature branches? [ feature / ] 
error: could not lock config file.git/config —No authorization
Release branches ? [ release / ] 
error: could not lock config file.git/config —No authorization
Hotfix branches? [hotfix/] 
error: could not lock config file.git/config —No authorization
Support branches? [support/] 
error: could not lock config file.git/config —No authorization
Version tag prefix?[ ] 
error: could not lock config file.git/config —No authorization

appears.

Also, I thought it was a permission related issue, so I changed the permission of config to
-rwxrwxrwx1ec2-userec2-user264 September 30 17:23 config

I changed it like this, but it still doesn't work.
Does anyone know?

git

2022-09-30 20:12

2 Answers

I think it's a matter of directory owner and permission.

ls-ld..

Check it out in .
( /var/www/ is a directory that is traditionally for publication.As you may know, please be careful.)


2022-09-30 20:12

fatal:Unable to create'/var/www/html/dev1/tomato/.git/index.lock'

/var/www/html/dev1/tomato/.git The directory does not have write permission, so I think the lock file could not be created.

Change the owner to ec2-user in chown-Rec2-user/var/www/html/dev1/tomato.


2022-09-30 20:12

If you have any answers or tips


© 2024 OneMinuteCode. All rights reserved.