2

I was previously using GIT with unfuddle, however I'm looking at trying Gitflow with Github as the central repository. So far I have done the following so far:

  • Create Github account and create repository within Github I.e website
  • cd /home/username/Downloads/ (on local machine)
  • wget -q – http://github.com/nvie/gitflow/raw/develop/contrib/gitflow-installer.sh –no-check-certificate
  • sudo chmod a+x gitflow-installer.sh
  • sudo chmod a+x gitflow-installer.sh
  • cd /var/www/website/ (where the website files are)
  • git flow init
  • git remote add origin [email protected]:username/website.git
  • git add *
  • git commit -am “initial commit”

All files are now committed ready to push to the central repository.

Create SSH key using this tutorial - https://help.github.com/articles/generating-ssh-keys

Now, I'm trying to push the files to the central respository, however although the files have been pushed I got the following errors:

error: unable to create directory for .git/refs/remotes/origin/develop

error: Cannot lock the ref 'refs/remotes/origin/develop'.

Any idea why? Is this the correct setup so far?

1
  • Is it because I didn't do git config remote.origin.push refs/heads/master:refs/heads/master? Commented Nov 15, 2012 at 16:39

1 Answer 1

0

"unable to create directory for .git/refs/remotes/origin/develop" means there is a permission issue to write the remote reference in your local repo initialized in /var/www/website/.

In this question for instance, the OP had to do a sudo git push.
sudo or chown are mentioned in "Problems with first upload to github".

On the remote side, as mentioned in "uploading a repository to github fails says “permission denied”", make sure to add your public ssh key to your GitHub repo.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.