I'd like to push my code to Gerrit. I added these lines in my ~/.gitconfig
[remote "origin"]
url = ssh://hxx@www.xxxx.com:29418/project/cloud
fetch = +refs/heads/*:refs/remotes/origin/*
push = refs/heads/*:refs/for/*
When I push in my source tree, I got error:
'git -c diff.mnemonicprefix=false -c core.quotepath=false -c credential.helper=sourcetree push -v origin refs/heads/master:refs/heads/refs/for/master
Pushing to ssh://hxx@www.xxxx.com:29418/project/cloud
remote:
remote: Processing changes: refs: 1
remote: Processing changes: refs: 1, done
To ssh://hxx@www.xxxx.com:29418/project/cloud
! [remote rejected] master -> refs/for/master (prohibited by Gerrit)
error: failed to push some refs to
ssh://hxx@www.xxxx.com:29418/project/cloud
Pushing to ssh://hxx@www.xxxx.com:29418/project/cloud
remote:
remote: Processing changes: refs: 1
remote: Processing changes: refs: 1, done
To ssh://hxx@www.xxxx.com:29418/project/cloud! [remote rejected] master ->
refs/for/master (prohibited by Gerrit)
error: failed to push some refs to ssh://hxx@www.xxxx.com:29418/project/cloud
Completed with errors, see above
It seems my sourcetree send push command twice. also the command is incorrect:
git -c diff.mnemonicprefix=false -c core.quotepath=false -c credential.helper=sourcetree push -v origin refs/heads/master:refs/heads/refs/for/master
It seems the correct command should be:
git -c diff.mnemonicprefix=false -c core.quotepath=false -c credential.helper=sourcetree push -v origin master:refs/for/master
where is my mistake in my configuration?
Thanks in advance.