在执行:致命:坏数字配置于git的 'core.sharedrepository'/配置值:无效单元(Git中的Bash)
$ git push -u origin --all
我得到了一个错误:
remote: error: insufficient permission for adding an object to repository database ./objects
我搜索了一下,找到了Richard Hansen的解决方案。
我不得不执行:
$ git config core.sharedRepository group
相反,我执行它:
$ git config core.sharedRepository dev
,因为我认为我有实际的命令输入组的名称(这里“开发”是具有用户的组的名称,名为“gituser”)。
从那以后,每当我试图执行在Git中的Bash任何指令,它是说:
fatal: bad numeric config value 'dev' for 'core.sharedrepository' in .git/config: invalid unit
对于本太,我发现在this link
一个解决方案,说:
When you enter an invalid value for git config core.sharedRepository, it may fail continuously rather than let you update again with this command:
git core.sharedRepository group
In which case you will need to open up the .git/config file and alter the file manually, like so:
[core] ... sharedRepository = group
我这样做,但都是徒劳的。 Git Bash中的任何命令都给出了相同的错误:
fatal: bad numeric config value 'dev' for 'core.sharedrepository' in .git/config: invalid unit
有人可以帮我解决这个问题。提前致谢。
是冯,我试图用 '团' 的命令,但输出总是“致命:错误的数字配置值.......'。事实上,执行甚至'git status'也会给出同样的致命错误。我不知道如何恢复'$ git config core.sharedRepository dev'。 –
你在键入什么命令? – VonC
@AshishGoyal你应该可以手动修改'.git/config'文件。 – VonC