首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >git init在错误的位置创建目录?

git init在错误的位置创建目录?
EN

Stack Overflow用户
提问于 2021-12-08 05:38:31
回答 1查看 43关注 0票数 1
代码语言:javascript
复制
paladin1@locutus:~> ls -ld .password-store/
drwxrwxrwx 3 paladin1 users 4096 Dec  8 00:14 .password-store/
paladin1@locutus:~> cd .password-store/
paladin1@locutus:~/.password-store> env | grep GIT
paladin1@locutus:~/.password-store> git init
hint: Using 'master' as the name for the initial branch. This default branch name
hint: is subject to change. To configure the initial branch name to use in all
hint: of your new repositories, which will suppress this warning, call:
hint: 
hint:   git config --global init.defaultBranch <name>
hint: 
hint: Names commonly chosen instead of 'master' are 'main', 'trunk' and
hint: 'development'. The just-created branch can be renamed via this command:
hint: 
hint:   git branch -m <name>
Initialized empty Git repository in /home/paladin1/.git/
paladin1@locutus:~/.password-store> pass git init
fatal: cannot change to '/home/paladin1/.password-store': Permission denied

(我通常对这个目录没有777个权限;这是用于故障排除的。)

为什么git要在父目录中创建它的存储库,而不是我告诉它的位置?

EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2021-12-08 05:51:01

当@torek在上面的评论中提出一个问题时,

git在消防监狱中运行,没有目录访问权限。

票数 1
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/70270441

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档