When I try and pull:
error: cannot open .git/FETCH_HEAD: Permission denied
When I try a push or a push -u origin master:
master -> master (non-fast-forward)
error: failed to push some refs to 'git@github.com:xxxxxxxx/xxxxxxxxxx.git'
To prevent you from losing history, non-fast-forward updates were rejected
Merge the remote changes before pushing again. See the 'Note about
-forwards' section of 'git push --help' for details.
Reading through the “man git-push” they mention a “git pull” should be enough to resolve this, but since you’re getting “error: cannot open .git/FETCH_HEAD: Permission denied” did you perhaps create the clone of the branch using sudo ? If so your files may not be readable by your user. Double check that the file .git/FETCH_HEAD is readable by your user account.