Regarding the steps to upload ssh key to gerrit account
-
Hi ,
I have read the Qt contribution documentation,
so before downloading the source code and compiling. We need to follow
three steps.- How to get started - Gerrit registration
- Local Setup
- Configuring Git.
I am using Ubuntu OS, and Qt version 5.7.
Do we need to do as root user?.During generating the ssh public key.
we get two keys, i have saved as id_rsa id_rsa.pub . under ~/.ssh folder.
Here is a link were i uploaded ssh key of id_rsa.pub.
https://postimg.org/image/okdcl8ul7/have i uploaded ssh key correctly?.
Edit:
Please don't post multiples of the same topic!
https://forum.qt.io/topic/71711/regarding-the-steps-to-upload-ssh-key-to-gerrit-account
https://forum.qt.io/topic/71707/regarding-the-local-set-up-of-config-file-for-qt-contribution
https://forum.qt.io/topic/71712/regarding-the-local-set-up-of-config-file-for-qt-contribution~kshegunov
-
Hey sorry for that just posted as in general and for both contribution.
Opened two threads because, upload ssh key to gerrit account and configuring local set up i seggregated so it would be easy.
-
@Pradeep-Kumar said in Regarding the steps to upload ssh key to gerrit account:
Do we need to do as root user?.
No, at least in principle. I use my own user, not root.
have i uploaded ssh key correctly?
From what I can tell. However this key is valid for a single user on your machine. If you uploaded the root ssh key, then it will work for the root user. As I said, don't use
root
at all. Get the key for a regular user, upload it, and use that regular user for development.As for your other question(s) (the threads I've locked)
you don't need a .ssh config file.
Edit: I'm just writing silly things now
You need a simple entry with your codereview username that looks like this:Host codereview.qt-project.org Port 29418 User <your username> IdentityFile <private key file>
but that should be explained in the gerrit setup wiki, shouldn't it?
You
onlyneed to add the codereview provided fingerprint as known host. E.g. I have:Entry for ~/.ssh/known_hosts: [codereview.qt-project.org]:29418 ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAAA...TSHerdBQ==
-
You need a simple entry with your codereview username that looks like this:
Host codereview.qt-project.org Port 29418 User <name means user name or name given to gerrit account> IdentityFile <private key file path>
As specified in the link https://wiki.qt.io/Setting_up_Gerrit#Local_Setup ,
based on this i asked Gerrit username?.
and file path?. -
@Pradeep-Kumar said in Regarding the steps to upload ssh key to gerrit account:
based on this i asked Gerrit username?.
Yes, gerrit username.
and file path?
Path to private key file, e.g.
id_rsa
meaning~/.ssh/config/id_rsa
. I use the default, so I don't have that entry. -
K i rephrase
Host codereview.qt-project.org Port 29418 User pradeep_kumar.m IdentityFile ~/.ssh/config/ida_rsa
As per the username which i provided to Gerrit account.
https://postimg.org/image/o1w5bpmmj/And Firstly i should not login as root
second angular brackets should not be thereIs this correct.
-
Appears to be correct. You do this per OS user, meaning if you did that as root and then login as another user, you need to repeat for that other user.
-
- How to get started - Gerrit registration
- Local Setup
in case Gerrit registration and Local set up i understood , then coming to Configuring Git
- Configuring Git.
I followed below link as i done in root user.
https://wiki.qt.io/Setting_up_Gerrit#Configuring_GitNow i will do as a normal user.
so is it fine?. -
While Configuring Git
Link is here.
https://wiki.qt.io/Setting_up_Gerrit#Configuring_GitWe need provide the commands in user path not as root user.
The below commands
$ git config --global user.name "Your Name"
$ git config --global user.email "me@example.com"user name is our name.
user email is gerrit account registered emailwhich i provided in Gerrit account, here is the link
https://postimg.org/image/jwv7lcn33/To facilitate following the style guide for commit messages, it is recommended to install the Qt commit message template:
$ git config --global commit.template <path to qt5.git or qt.git>/.commit-template
path is where the source code is there, we get .git directory, that path we need to give
Ex : /user/qt5/.git
git config --global commit.template </user/qt5/.git>/.commit-template
Is this correct?.
-
@Pradeep-Kumar said in Regarding the steps to upload ssh key to gerrit account:
Now i will do as a normal user.
That's what I advise, yes - use a normal user, not the
root
.Is this correct?
From what I can tell.
-
user name and email provided and the commands in previous post.
i asked is it correct?. -
@Pradeep-Kumar said in Regarding the steps to upload ssh key to gerrit account:
i asked is it correct?
And I have answered in my previous post. If I may be completely blunt, I can't hold your hand through the whole processes, I know it seems confusing at first, but it's just required to follow the instructions in the wiki to the letter.
-
yes i need to follow correctly , i dont know where is the configuration wrong.