Git clone over https not working after upgrade from 3.4.0 to 3.7.2

349 views
Skip to first unread message

Nagarjuna Veeraboyani

unread,
May 15, 2023, 11:30:55 AM5/15/23
to Repo and Gerrit Discussion
Why this is marked as abuse? It has been marked as abuse.
Report not abuse
Hi There,

We installed gerrit as part k8s pod. git clone over ssh & https used to work before upgrading to 3.7.2, now there seems to be an issue with git clone over https. 

seeing below fatal error:

git clone "https://gerrit-staging.local.xxx.com/yyy-jobs"
Cloning into 'yyy-jobs'...
fatal: unable to access 'https://gerrit-staging.local.xxx.com/yyy-jobs/': SSL: no alternative certificate subject name matches target host name 'gerrit-staging.local.xxx.com'
 

Using java version inside pod:
java --version
openjdk 11.0.16 2022-07-19
OpenJDK Runtime Environment (build 11.0.16+8-post-Ubuntu-0ubuntu118.04)
OpenJDK 64-Bit Server VM (build 11.0.16+8-post-Ubuntu-0ubuntu118.04, mixed mode, sharing)


Anyone else seen this behavior ?

Luca Milanesio

unread,
May 15, 2023, 11:33:35 AM5/15/23
to Nagarjuna Veeraboyani, Luca Milanesio, Repo and Gerrit Discussion
Why this is marked as abuse? It has been marked as abuse.
Report not abuse

On 15 May 2023, at 15:34, 'Nagarjuna Veeraboyani' via Repo and Gerrit Discussion <repo-d...@googlegroups.com> wrote:

Hi There,

We installed gerrit as part k8s pod. git clone over ssh & https used to work before upgrading to 3.7.2, now there seems to be an issue with git clone over https. 

seeing below fatal error:

git clone "https://gerrit-staging.local.xxx.com/yyy-jobs"
Cloning into 'yyy-jobs'...
fatal: unable to access 'https://gerrit-staging.local.xxx.com/yyy-jobs/': SSL: no alternative certificate subject name matches target host name 'gerrit-staging.local.xxx.com'

I believe the above message tells you what happened:
SSL: no alternative certificate subject name matches target host name 'gerrit-staging.local.xxx.com'"

You have an invalid certificate and the subject doesn’t match the hostname.
You need to request your company’s CA an X.509 certificate where the subject corresponds to the hostname.

HTH

Luca.

 

Using java version inside pod:
java --version
openjdk 11.0.16 2022-07-19
OpenJDK Runtime Environment (build 11.0.16+8-post-Ubuntu-0ubuntu118.04)
OpenJDK 64-Bit Server VM (build 11.0.16+8-post-Ubuntu-0ubuntu118.04, mixed mode, sharing)


Anyone else seen this behavior ?

--
--
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.
To view this discussion on the web visit https://groups.google.com/d/msgid/repo-discuss/2693d7e7-39f1-4248-8db6-47b35524a61en%40googlegroups.com.

Nagarjuna Veeraboyani

unread,
May 15, 2023, 12:05:16 PM5/15/23
to Luca Milanesio, Repo and Gerrit Discussion
Why this is marked as abuse? It has been marked as abuse.
Report not abuse
Thanks for prompt response Luca,

Why did I skip the ssl verification like below seeing error: "fatal: unable to update url base from redirection:" as below.



How and where can I change the ssl config?


Regards,
Nagarjuna.

Fabio Ponciroli

unread,
May 15, 2023, 12:33:53 PM5/15/23
to Nagarjuna Veeraboyani, Luca Milanesio, Repo and Gerrit Discussion
Why this is marked as abuse? It has been marked as abuse.
Report not abuse
Hi Nagarjuna,

On Mon, 15 May 2023 at 18:05, 'Nagarjuna Veeraboyani' via Repo and Gerrit Discussion <repo-d...@googlegroups.com> wrote:
Thanks for prompt response Luca,

Why did I skip the ssl verification like below seeing error: "fatal: unable to update url base from redirection:" as below.

git -c http.sslVerify=false clone "https://gerrit-staging.local.forwardnetworks.com/fwd-jenkins-jobs"
Cloning into 'fwd-jenkins-jobs'...
fatal: unable to update url base from redirection:
  asked for: https://gerrit-staging.local.xxx.com/fwd-jenkins-jobs/info/refs?service=git-upload-pack

 

It is asking you to login here ^^
Is the repo available for anonymous users?
Can you try cloning with your user credentials?
 



How and where can I change the ssl config?


Updating your certificates has nothing to have with Gerrit. If you have a load balancer in front of your installation, for example, you will have to replace the certificates once your company’s CA will provide them to you.

Just to give you a load balancer example, here [1] one with haproxy where you can see where the certificates are stored.

HTH,
Ponch



 

Nagarjuna Veeraboyani

unread,
May 15, 2023, 8:08:54 PM5/15/23
to Fabio Ponciroli, Luca Milanesio, Repo and Gerrit Discussion
Why this is marked as abuse? It has been marked as abuse.
Report not abuse
Hi Fabio,

I did pass the right credentials but still getting the same login redirection error as below. 

git -c http.sslVerify=false clone "https://{username}:{pwd}@gerrit-staging.local.xxx.com/fwd-jenkins-jobs"

Cloning into 'fwd-jenkins-jobs'...
fatal: unable to update url base from redirection:

Sven Selberg

unread,
May 16, 2023, 3:01:31 AM5/16/23
to Repo and Gerrit Discussion
Why this is marked as abuse? It has been marked as abuse.
Report not abuse
On Tuesday, May 16, 2023 at 2:08:54 AM UTC+2 Nagarjuna Veeraboyani wrote:
Hi Fabio,

I did pass the right credentials but still getting the same login redirection error as below. 

git -c http.sslVerify=false clone "https://{username}:{pwd}@gerrit-staging.local.xxx.com/fwd-jenkins-jobs"

If Gerrit handles authentication you'll need to add an '/a/' after $FQDN/$CONTENT_PATH.
https://gerrit-review.googlesource.com/Documentation/rest-api.html#authentication

So in that case the URL should be:
gerrit-staging.local.xxx.com/a/fwd-jenkins-jobs

Sven Selberg

unread,
May 16, 2023, 3:36:16 AM5/16/23
to Repo and Gerrit Discussion
Why this is marked as abuse? It has been marked as abuse.
Report not abuse
On Tuesday, May 16, 2023 at 9:01:31 AM UTC+2 Sven Selberg wrote:
On Tuesday, May 16, 2023 at 2:08:54 AM UTC+2 Nagarjuna Veeraboyani wrote:
Hi Fabio,

I did pass the right credentials but still getting the same login redirection error as below. 

git -c http.sslVerify=false clone "https://{username}:{pwd}@gerrit-staging.local.xxx.com/fwd-jenkins-jobs"

If Gerrit handles authentication you'll need to add an '/a/' after $FQDN/$CONTENT_PATH.

should be "$FQDN/$CONTEXT_PATH".

Matthias Sohn

unread,
May 16, 2023, 3:50:59 AM5/16/23
to Sven Selberg, Repo and Gerrit Discussion
Why this is marked as abuse? It has been marked as abuse.
Report not abuse
On Tue, May 16, 2023 at 9:36 AM Sven Selberg <sven.s...@axis.com> wrote:


On Tuesday, May 16, 2023 at 9:01:31 AM UTC+2 Sven Selberg wrote:
On Tuesday, May 16, 2023 at 2:08:54 AM UTC+2 Nagarjuna Veeraboyani wrote:
Hi Fabio,

I did pass the right credentials but still getting the same login redirection error as below. 

git -c http.sslVerify=false clone "https://{username}:{pwd}@gerrit-staging.local.xxx.com/fwd-jenkins-jobs"

If Gerrit handles authentication you'll need to add an '/a/' after $FQDN/$CONTENT_PATH.

should be "$FQDN/$CONTEXT_PATH".

I think the /a prefix should go in between domain name and context path like in your example

"$FQDN/a/$CONTEXT_PATH"
 

Sven Selberg

unread,
May 16, 2023, 4:06:30 AM5/16/23
to Repo and Gerrit Discussion
Why this is marked as abuse? It has been marked as abuse.
Report not abuse
On Tuesday, May 16, 2023 at 9:50:59 AM UTC+2 Matthias Sohn wrote:
On Tue, May 16, 2023 at 9:36 AM Sven Selberg <sven.s...@axis.com> wrote:


On Tuesday, May 16, 2023 at 9:01:31 AM UTC+2 Sven Selberg wrote:
On Tuesday, May 16, 2023 at 2:08:54 AM UTC+2 Nagarjuna Veeraboyani wrote:
Hi Fabio,

I did pass the right credentials but still getting the same login redirection error as below. 

git -c http.sslVerify=false clone "https://{username}:{pwd}@gerrit-staging.local.xxx.com/fwd-jenkins-jobs"

If Gerrit handles authentication you'll need to add an '/a/' after $FQDN/$CONTENT_PATH.

should be "$FQDN/$CONTEXT_PATH".

I think the /a prefix should go in between domain name and context path like in your example

"$FQDN/a/$CONTEXT_PATH"

We (for whatever historical reason) have a context path to our Gerrit server and the /a definitely goes after the context path.
It is Gerrit that reads the "/a" and Gerrit only serves what is under $FQDN/$CONTEXT_PATH.

Matthias Sohn

unread,
May 16, 2023, 4:36:15 AM5/16/23
to Sven Selberg, Repo and Gerrit Discussion
Why this is marked as abuse? It has been marked as abuse.
Report not abuse
On Tue, May 16, 2023 at 10:06 AM Sven Selberg <sven.s...@axis.com> wrote:


On Tuesday, May 16, 2023 at 9:50:59 AM UTC+2 Matthias Sohn wrote:
On Tue, May 16, 2023 at 9:36 AM Sven Selberg <sven.s...@axis.com> wrote:


On Tuesday, May 16, 2023 at 9:01:31 AM UTC+2 Sven Selberg wrote:
On Tuesday, May 16, 2023 at 2:08:54 AM UTC+2 Nagarjuna Veeraboyani wrote:
Hi Fabio,

I did pass the right credentials but still getting the same login redirection error as below. 

git -c http.sslVerify=false clone "https://{username}:{pwd}@gerrit-staging.local.xxx.com/fwd-jenkins-jobs"

If Gerrit handles authentication you'll need to add an '/a/' after $FQDN/$CONTENT_PATH.

should be "$FQDN/$CONTEXT_PATH".

I think the /a prefix should go in between domain name and context path like in your example

"$FQDN/a/$CONTEXT_PATH"

We (for whatever historical reason) have a context path to our Gerrit server and the /a definitely goes after the context path.
It is Gerrit that reads the "/a" and Gerrit only serves what is under $FQDN/$CONTEXT_PATH.


yeah, you are right and I was wrong 

Nagarjuna Veeraboyani

unread,
May 16, 2023, 12:25:03 PM5/16/23
to Matthias Sohn, Sven Selberg, Repo and Gerrit Discussion
Why this is marked as abuse? It has been marked as abuse.
Report not abuse
Thanks a lot Matthias,


Regards,
Nagarjuna.





You received this message because you are subscribed to a topic in the Google Groups "Repo and Gerrit Discussion" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/repo-discuss/2vSLvFEYO_c/unsubscribe.
To unsubscribe from this group and all its topics, send an email to repo-discuss...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/repo-discuss/CAKSZd3Q8md7yeZ-gmeMwOhFmmOb1Z8zjBSQo5ugw8T8c6yu7hg%40mail.gmail.com.

Matthias Sohn

unread,
May 17, 2023, 10:51:31 AM5/17/23
to Nagarjuna Veeraboyani, Sven Selberg, Repo and Gerrit Discussion
Why this is marked as abuse? It has been marked as abuse.
Report not abuse
On Tue, May 16, 2023 at 6:24 PM Nagarjuna Veeraboyani <nagarjunav...@forwardnetworks.com> wrote:
Thanks a lot Matthias,



Don't pass the password in the URL, that's insecure.

Nagarjuna Veeraboyani

unread,
May 17, 2023, 9:52:48 PM5/17/23
to Matthias Sohn, Sven Selberg, Repo and Gerrit Discussion
Why this is marked as abuse? It has been marked as abuse.
Report not abuse
Got it, thanks. I did it as part of a test one time.
Reply all
Reply to author
Forward
0 new messages