how to create new project through ssh command by user other than Admin

36 views
Skip to first unread message

Gouranga Panigrahi

unread,
Dec 3, 2013, 4:57:38 AM12/3/13
to repo-d...@googlegroups.com
Hi,

I am working on a change: Adding Create branch ssh command to gerrit.

Now i m able to create a branch through ssh command while logged in as Admin user.

I need to create a branch by user other than admin and i guess some access settings need to be done in the ui to
grant the permission.

I think for create project also it will me similar kind of settings. If anyone can plase tell me the steps for achieving this for create project, so that
i can implement the same for create branch.

Thank
Gouranga

David Pursehouse

unread,
Dec 3, 2013, 5:01:42 AM12/3/13
to Gouranga Panigrahi, repo-d...@googlegroups.com
Please refer to the "ACCESS" section of the create-project command's
documentation [1].

[1]
https://gerrit-documentation.storage.googleapis.com/Documentation/2.8/cmd-create-project.html



> Thank
> Gouranga
>
> --
> --
> To unsubscribe, email repo-discuss...@googlegroups.com
> More info at http://groups.google.com/group/repo-discuss?hl=en
>
> ---
> You received this message because you are subscribed to the Google
> Groups "Repo and Gerrit Discussion" group.
> To unsubscribe from this group and stop receiving emails from it, send
> an email to repo-discuss...@googlegroups.com.
> For more options, visit https://groups.google.com/groups/opt_out.

David Pursehouse

unread,
Dec 3, 2013, 5:03:25 AM12/3/13
to repo-d...@googlegroups.com
On 12/03/2013 06:57 PM, Gouranga Panigrahi wrote:
> Hi,
>
> I am working on a change: Adding Create branch ssh command to gerrit.
>

Why?

Branches can be created by git push, as long as the user has the
necessary 'create ref' permission on the project.

git push origin HEAD:refs/heads/my-new-branch

mani chandel

unread,
Dec 3, 2013, 5:13:23 AM12/3/13
to repo-d...@googlegroups.com
Hi David,

This is for gerrit issue 1156.

Regards,
Mani

David Pursehouse

unread,
Dec 3, 2013, 5:31:32 AM12/3/13
to mani chandel, repo-d...@googlegroups.com
On 12/03/2013 07:13 PM, mani chandel wrote:
> Hi David,
>
> This is for gerrit issue 1156.
> https://code.google.com/p/gerrit/issues/detail?id=1156

OK. Having read that I still don't see how this use case differs enough
from creating the branch via git push to justify having a new SSH
command for it.

Current workflow:

1. Create the branch: git push origin master:refs/heads/new-branch
2. Push commits for review: git push origin HEAD:refs/for/new-branch

Workflow with SSH command:

1. Create the branch: ssh -p 29418 user@review gerrit create-branch [...]
2. Push commits for review: git push origin HEAD:refs/for/new-branch

In both cases the branch needs to be created before commits can be
pushed for review.

The only difference I can see is that with the ssh command the user is
limited to creating the branch, and cannot push changes into it at the
same time.


> <https://mail.nokia.com/owa/redir.aspx?C=9xmSUGNtgEy91Z-nzA78gDRrkhrrwtAI7GPEEfwCQzXFJe4Zh_uZTFzXLHkVSDGmpbYhnweAS9E.&URL=https%3a%2f%2fcode.google.com%2fp%2fgerrit%2fissues%2fdetail%3fid%3d1156>
>
Note that your link redirects to Nokia's webmail server :)


Reply all
Reply to author
Forward
0 new messages