Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/github/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
使用Github设置的Gitflow_Git_Github_Installation_Git Flow_Centralized - Fatal编程技术网

使用Github设置的Gitflow

使用Github设置的Gitflow,git,github,installation,git-flow,centralized,Git,Github,Installation,Git Flow,Centralized,我以前在unfuddle中使用GIT,但是我正在尝试使用Github作为中央存储库的Gitflow。到目前为止,我已经做了以下工作: 在Github(即网站)中创建Github帐户并创建存储库 cd/home/username/Downloads/(在本地计算机上) wget-q- http://github.com/nvie/gitflow/raw/develop/contrib/gitflow-installer.sh –无支票证书 sudochmoda+xgitflow安装程序.sh s

我以前在unfuddle中使用GIT,但是我正在尝试使用Github作为中央存储库的Gitflow。到目前为止,我已经做了以下工作:

  • 在Github(即网站)中创建Github帐户并创建存储库
  • cd/home/username/Downloads/
    (在本地计算机上)
  • wget-q-
    http://github.com/nvie/gitflow/raw/develop/contrib/gitflow-installer.sh
    –无支票证书
  • sudochmoda+xgitflow安装程序.sh
  • sudochmoda+xgitflow安装程序.sh
  • cd/var/www/website/
    (网站文件所在位置)
  • git流初始化
  • git远程添加源git@github.com:username/website.git
  • git add*
  • git提交-am“initial commit”
所有文件现在都已提交,可以推送到中央存储库

使用本教程创建SSH密钥-

现在,我正在尝试将文件推送到中心响应,但是,尽管文件已被推送,但仍出现以下错误:

错误:无法为.git/refs/remotes/origin/develop创建目录

错误:无法锁定ref“refs/remotes/origin/develope”。

知道为什么吗?到目前为止,这是正确的设置吗?

“无法为.git/refs/remotes/origin/develope创建目录”表示存在在
/var/www/website/
中初始化的本地repo中写入远程引用的权限问题

例如,OP必须执行一个
sudogit推送

sudo
chown
在“”中提到


在远程端,如“”中所述,确保将您的公共ssh密钥添加到GitHub repo。

是因为我没有执行
git config remote.origin.push refs/heads/master:refs/heads/master