Create new project in Gerrit

1,358 views
Skip to first unread message

Claudia Santos

unread,
May 19, 2010, 2:50:21 AM5/19/10
to repo-d...@googlegroups.com
Hi all,

I'm trying to create a new project in Gerrit with the following command:


ssh -p 29418 mydomain.com gerrit create-project --name projects/project_name

Then i got this message:

The authenticity of host '[mydomain.com]:29418 ([172.17.27.186]:29418)' can't be established.
RSA key fingerprint is 80:a0:09:ce:2e:aa:97:95:2a:d3:54:d2:e5:e6:63:ad.
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added '[mydomain.com]:29418,[172.17.27.186]:29418' (RSA) to the list of known hosts.
Admini...@mydomain.com's password:
Permission denied, please try again.

Gerrit, GIT and Cygwin are installed in a Windows Server 2003. I'm logged as Administartor.
SSH uses the logged user to authentication and then it fails to authenticate against the Windows Domain. Why does SSH use the logged user? How can i change that configuration?
Actually is Gerrit configurated with HTTP authentication, that means, there is a file with Gerrit users and Apache HTTP Server uses it to authentication purposes.

I attempted as well to use H2 Console to insert the new project in the Gerrit's Table Projects, but i didn't find either projects or branches tables in ReviewDB.h2.db, it seems to be empty. Is there a schema that i could apply?



Thanks in advance,

Santos

--
To unsubscribe, email repo-discuss...@googlegroups.com
More info at http://groups.google.com/group/repo-discuss?hl=en

Ishaaq Chandy

unread,
May 19, 2010, 3:21:42 AM5/19/10
to Claudia Santos, repo-d...@googlegroups.com
to be able to use the sshd-based create-project command you will first
have to register your ssh key with gerrit using its web ui. You will
get the opportunity to set/change your ssh username as well in the
same page.

Once you have done so you can either do:

ssh -p 29418 mydomain.com gerrit create-project --name projects/project_name

or

ssh -p 29418 user...@mydomain.com gerrit create-project --name
projects/project_name

(use the latter form if the username you registered does not
correspond to your local OS username).

Of course, even if you do login successfully, the command will only be
successful if you have the requisite permissions to create projects.

Regards,
Ishaaq

csantos

unread,
May 19, 2010, 4:18:34 AM5/19/10
to Repo and Gerrit Discussion
Thanks Ishaaq,

I registered SSH keys for the Gerrit users, then i tried again to
create the project:

C:\review_site>ssh -p 29418 csa...@mydomain.com gerrit create-project
--name projects/xg-im
csa...@mydomain.com's password:
Permission denied, please try again.

With my user, that is as well Gerrit's administrator, SSH asked a
password, but canno't validate it.

With another Gerrit user, SSH asked the passphrase. It accepts the
passphrase but didn't complete the command due the user isn't an
administrator.

C:\review_site>ssh -p 29418 Admini...@mydomain.com gerrit create-
project --name projects/xg-im
Enter passphrase for key '/home/Administrator/.ssh/id_rsa':
fatal: Not a Gerrit administrator

Any clues?

regards,

Santos


On May 19, 9:21 am, Ishaaq Chandy <ish...@gmail.com> wrote:
> to be able to use the sshd-based create-project command you will first
> have to register your ssh key with gerrit using its web ui. You will
> get the opportunity to set/change your ssh username as well in the
> same page.
>
> Once you have done so you can either do:
>
> ssh -p 29418 mydomain.com gerrit create-project --name projects/project_name
>
> or
>
> ssh -p 29418 usern...@mydomain.com gerrit create-project --name
> projects/project_name
>
> (use the latter form if the username you registered does not
> correspond to your local OS username).
>
> Of course, even if you do login successfully, the command will only be
> successful if you have the requisite permissions to create projects.
>
> Regards,
> Ishaaq
>
> On 19 May 2010 16:50, Claudia Santos <claudia.cm.san...@gmail.com> wrote:
>
>
>
> > Hi all,
>
> > I'm trying to create a new project in Gerrit with the following command:
>
> > ssh -p 29418 mydomain.com gerrit create-project --name projects/project_name
>
> > Then i got this message:
>
> > The authenticity of host '[mydomain.com]:29418 ([172.17.27.186]:29418)'
> > can't be established.
> > RSA key fingerprint is 80:a0:09:ce:2e:aa:97:95:2a:d3:54:d2:e5:e6:63:ad.
> > Are you sure you want to continue connecting (yes/no)? yes
> > Warning: Permanently added '[mydomain.com]:29418,[172.17.27.186]:29418'
> > (RSA) to the list of known hosts.
> > Administra...@mydomain.com's password:
> > Permission denied, please try again.
>
> > Gerrit, GIT and Cygwin are installed in a Windows Server 2003. I'm logged as
> > Administartor.
> > SSH uses the logged user to authentication and then it fails to authenticate
> > against the Windows Domain. Why does SSH use the logged user? How can i
> > change that configuration?
> > Actually is Gerrit configurated with HTTP authentication, that means, there
> > is a file with Gerrit users and Apache HTTP Server uses it to authentication
> > purposes.
>
> > I attempted as well to use H2 Console to insert the new project in the
> > Gerrit's Table Projects, but i didn't find either projects or branches
> > tables in ReviewDB.h2.db, it seems to be empty. Is there a schema that i
> > could apply?
>
> > Thanks in advance,
>
> > Santos
>
> > --
> > To unsubscribe, email repo-discuss...@googlegroups.com
> > More info athttp://groups.google.com/group/repo-discuss?hl=en
>
> --
> To unsubscribe, email repo-discuss...@googlegroups.com
> More info athttp://groups.google.com/group/repo-discuss?hl=en

Ishaaq Chandy

unread,
May 19, 2010, 5:20:34 AM5/19/10
to csantos, Repo and Gerrit Discussion
If its asking for a password it usually indicates that either ssh is
using the wrong keyfile or couldn't find one. I don't use Windows or
Cygwin so have no idea where the default location for keyfiles on your
OS is. Normally on a Unix machine your private key should be located
at:

~/.ssh/id_rsa OR ~/.ssh/id_dsa

So, find out where the default equivalent location is on Windows and
double check to see whether that is indeed the key file you should be
using.

Alternatively you can use:

ssh -i /path/to/private_key_file -p 29418 csa...@mydomain.com gerrit
create-project .....

to explicitly specify a keyfile.

Finally, you can run ssh in verbose mode to give you some hints as to
what is happening behind the scenes:

ssh -v -i /path/to/private_key_file -p 29418 csa...@mydomain.com
gerrit create-project .....

Ishaaq
Reply all
Reply to author
Forward
0 new messages