1

I'm news in git and gitlab. I've installed it from the officiel installation. Trying to push some project via sourcetree for example, I've this result

`git -c diff.mnemonicprefix=false -c core.quotepath=false push -v --tags --set-upstream    origin master:master
 Pushing to git@xxx.xxxxx.xx:/home/git/repositories/root/all.git

remote: GitLab: You are not allowed to access master![K
remote: error: hook declined to update refs/heads/master[K

To git@xxx.xxxxx.xx:/home/git/repositories/root/all.git ! [remote rejected] master -> master (hook declined)

error: failed to push some refs to 'git@xxx.xxxxx.xx:/home/git/repositories/root/all.git' `

Someone have an idea?

Thank's

  • would http://stackoverflow.com/q/19510954/6309 help? – VonC Jun 10 '14 at 06:41
  • Thank's for your response. I've changed the repos_path to /projetgitlab/ with all privileges for all users but the same result. – Andry Vononka Jun 10 '14 at 10:48
  • My gitlab version is 6-4 stable. I note that I can create project and nac navigate to the URL for administration of gitlab. – Andry Vononka Jun 10 '14 at 10:49
  • Would cloning/pushing using an https url would work better than an ssh one? Or can you try and update gitlab to a latest version, to see if the issue persists? – VonC Jun 10 '14 at 10:57
  • I'm trying to do this in the prompt: mkdir aaa cd test git init touch README git add README git commit -m 'first commit' git remote add origin git@xxx.xxx.Xxx:user_dev/aaa.git git push -u origin master The result tell me that this is does not appear to be a git repository. What's wrong?? – Andry Vononka Jun 10 '14 at 11:20
  • I would rather declare a new empty repo on gitlab, and clone it locally, which set the remote origin for you, add, commit and push. – VonC Jun 10 '14 at 11:26
  • If you try to push without having declared a repo first on gitlab, you will get the error message you saw. – VonC Jun 10 '14 at 11:35
  • I've create this repo using the default URL of gitlab. Then, I use a git client to clone it localy and to push the data. – Andry Vononka Jun 10 '14 at 11:41
  • Clone: git -c diff.mnemonicprefix=false -c core.quotepath=false clone --recursive git@xxx.xxxxx.XX:/projetgitlab/userdev/aaa.git D:\e Cloning into 'D:\e'... warning: You appear to have cloned an empty repository. Push: remote: GitLab: You are not allowed to access master![K remote: error: hook declined to update refs/heads/master[K To git@xx.xxxxx.XX:/projetgitlab/userdev/aaa.git ! [remote rejected] master -> master (hook declined) error: failed to push some refs to 'git@xx.xxxxx.XX:/projetgitlab/userdev/aaa.git' – Andry Vononka Jun 10 '14 at 11:51
  • Since you are cloning a repo using ssh, do you have published your ssh public key on your gitlab account setting, in order to authenticate you (as the owner of the repo you have created and to which you are pushing)? – VonC Jun 10 '14 at 12:26
  • Is the shh-keygen -t rsa -C "usermail@test.com" are you teling? – Andry Vononka Jun 10 '14 at 13:15
  • It is: http://stackoverflow.com/a/11771907/6309. Don't put any passphrase to your private key, in order to test it. – VonC Jun 10 '14 at 14:04
  • Try to push and to generate a ssh key, this is the result: Access denied. fatal: Could not read from remote repository. Please make sure you have the correct access rights and the repository exists. – Andry Vononka Jun 10 '14 at 14:33
  • You must first add your public key to your GitLab profile before doing any push. – VonC Jun 10 '14 at 15:04
  • Ok. Thank's for your response. I'll tray it and will return here. – Andry Vononka Jun 10 '14 at 15:05
  • the problem is now solved. Thank's to all. Vononka – Andry Vononka Jun 12 '14 at 06:19
  • Great. I have added an answer to summarize those comments. Is there a specific step you did, and that I missed in my answer? – VonC Jun 12 '14 at 06:41
  • No, I've just follow your answer and now, it work perfectly. Thank you VonC – Andry Vononka Jun 12 '14 at 10:19

1 Answers1

0

After my comments, The OP Andry Vononka did:

Community
  • 1
  • 1
VonC
  • 1,262,500
  • 529
  • 4,410
  • 5,250