我以前使用过GIT和unfuddle,但是我正在尝试使用Gitflow和Github作为中心存储库。到目前为止,我已经做了以下工作:
cd /home/username/Downloads/ (在本地机器上)wget -q – http://github.com/nvie/gitflow/raw/develop/contrib/gitflow-installer.sh –no-check-certificatesudo chmod a+x gitflow-installer.shsudo chmod a+x gitflow-installer.shcd /var/www/website/ (网站文件所在的地方)git flow initgit remote add origin git@github.com:username/website.gitgit add *git commit -am “initial commit”所有文件现在都已准备好推送到中央存储库。
使用本教程- https://help.github.com/articles/generating-ssh-keys创建SSH键
现在,我试图将文件推送到中央存储库,但是,尽管文件已被推送,但我得到了以下错误:
.git/refs/remotes/origin/develop错误:无法为创建目录
'refs/remotes/origin/develop'.错误:无法锁定ref
知道为什么吗?到目前为止,这是正确的设置吗?
发布于 2012-11-16 07:28:54
“无法为..git/refs/远程/源程序/开发创建目录”意味着存在一个权限问题,可以在/var/www/website/初始化的本地回购中写入远程引用。
例如,在this question中,OP必须执行一个sudo git push。
sudo或chown在"Problems with first upload to github“中提到。
在远程方面,正如"uploading a repository to github fails says “permission denied”“中提到的,确保将您的公共ssh密钥添加到您的GitHub回购中。
https://stackoverflow.com/questions/13400851
复制相似问题