[JIRA] (JENKINS-46094) "Checkout over SSH" fails the build since it still uses HTTPS urls

7 views
Skip to first unread message

jsoref+jenkins@gmail.com (JIRA)

unread,
Jun 5, 2018, 8:05:02 PM6/5/18
to jenkinsc...@googlegroups.com
Josh Soref commented on Bug JENKINS-46094
 
Re: "Checkout over SSH" fails the build since it still uses HTTPS urls

The way we hit this was by using the GitHub Organization object from /view/Main/newJob.

GitHub Organization

  • Credentials User Account for GitHub (username+password)
  • Owner (the name of the GitHub Organization)
  • Behaviors:
    • – Repositories –
    • Filter by name (with wildcards)
    • Include: something – note: this wasn't relevant
    • Exclude_blank_ – also not relevant
    • – Within repository –
    • Discover branches
      • Strategy: Exclude branches that are also filed as PRs – note: this isn't relevant, and I think it's the default
    • Discover pull requests from origin
      • Strategy: Both the current pull request revision and the pull request merged with the current target branch revision – note: this isn't relevant
    • Discover pull requests from forks
      • Strategy: Both the current pull request revision and the pull request merged with the current target branch revision – note: this isn't relevant
    • Trust: From users with Admin or Write permission – note: this isn't relevant, and I think it's the default
    • – Additional –
    • Check out to matching local branch – this shouldn't be relevant, but it's necessary for our tooling, since we're trying to automatically push tags in some cases.

Project Recognizers

  • Pipeline Jenkinsfile
    • Script Path: slightly non-standard – note: this isn't relevant

Scan Organization Triggers

[x] Periodically if not otherwise run

Interval: 1 day  – note: this isn't relevant, and I think it's the default


Orphaned Item Strategy

[x] Discard old items – note: this isn't relevant, and I think it's the default

Days to keep old items: blank – note: this isn't relevant, and I think it's the default

Max # of old items to keep: blank – note: this isn't relevant, and I think it's the default


Health metrics

[Health metrics...] – note: this is a button which means nothing is set


Properties

– note: there's nothing here at all.


JIRA

JIRA sites [Add] – note: this is a button which means nothing is set


Pipeline Libraries

Sharable libraries available to any Pipeline jobs inside this folder. These libraries will be untrusted, meaning their code runs in the Groovy sandbox.

[Add] – note: this is a button which means nothing is set


Pipeline Model Definition

... this section has all empty / none defaults ...


Automatic branch project triggering

Branch names to build automatically: .* – note this isn't relevant



That's the basic configuration.

My goal is to push (see various notes about wanting to have things I can push).

To do this, I click the Add button just above "Project Recognizers", and select Checkout Over SSH which adds an item into -- Additional  -- and then I trigger a build.

Once I do that, I get a very fast build failure.

Started by user ...
19:45:35 Connecting to https://api.github.com using .../****** (... account for GitHub)
Obtained ...Jenkinsfile from ...
Cloning the remote Git repository
Cloning with configured refspecs honoured and without tags
Cloning repository https://github.com/.../....git
...
Fetching upstream changes from https://github.com/.../....git
ERROR: Error cloning remote repo 'origin'
hudson.plugins.git.GitException: Command "git fetch --no-tags --progress https://github.com/.../....git +refs/heads/master:refs/remotes/origin/master" returned status code 128:
stdout: 
stderr: remote: Invalid username or password.

 

Add Comment Add Comment
 
This message was sent by Atlassian JIRA (v7.3.0#73011-sha1:3c73d0e)
Atlassian logo

lists@libertylost.org (JIRA)

unread,
Jun 29, 2018, 3:59:03 PM6/29/18
to jenkinsc...@googlegroups.com

I'm having this same issue with Jenkins 2.121.1 and a GitHub Organization. 

"Checkout over SSH" is set, and is configured to use a valid ssh key, but every build is still attempting to use https:

 

stderr: remote: Password authentication is not available for Git operations.
remote: You must use a personal access token or SSH key.

 

 

This message was sent by Atlassian JIRA (v7.10.1#710002-sha1:6efc396)

jtpersian@gmail.com (JIRA)

unread,
Sep 7, 2018, 2:13:02 AM9/7/18
to jenkinsc...@googlegroups.com

Also getting this issue with Jenkins 2.121.3.

This message was sent by Atlassian Jira (v7.11.2#711002-sha1:fdc329d)

rendicott@gmail.com (JIRA)

unread,
Sep 12, 2018, 2:20:03 PM9/12/18
to jenkinsc...@googlegroups.com

We're also having this error with Jenkins 2.138 and a Github Enterprise Organization. Every checkout tries to use HTTPS even though the "Checkout over SSH" options are set at the Organization level. 

bitwiseman@gmail.com (JIRA)

unread,
Feb 18, 2019, 7:43:03 PM2/18/19
to jenkinsc...@googlegroups.com

bitwiseman@gmail.com (JIRA)

unread,
Feb 19, 2019, 4:31:02 PM2/19/19
to jenkinsc...@googlegroups.com

bitwiseman@gmail.com (JIRA)

unread,
Feb 19, 2019, 5:42:01 PM2/19/19
to jenkinsc...@googlegroups.com

Checked Gitea plugin.  Looks like it is okay. 

 

bitwiseman@gmail.com (JIRA)

unread,
Mar 27, 2019, 10:51:39 AM3/27/19
to jenkinsc...@googlegroups.com
Liam Newman started work on Bug JENKINS-46094
 
Change By: Liam Newman
Status: Open In Progress

bitwiseman@gmail.com (JIRA)

unread,
Mar 27, 2019, 10:51:39 AM3/27/19
to jenkinsc...@googlegroups.com

bitwiseman@gmail.com (JIRA)

unread,
Mar 27, 2019, 10:51:43 AM3/27/19
to jenkinsc...@googlegroups.com

bitwiseman@gmail.com (JIRA)

unread,
Mar 27, 2019, 10:53:02 AM3/27/19
to jenkinsc...@googlegroups.com
 
Re: "Checkout over SSH" fails the build since it still uses HTTPS urls

Bitbucket has been published.
I will publish github today.

bitwiseman@gmail.com (JIRA)

unread,
Mar 27, 2019, 5:54:03 PM3/27/19
to jenkinsc...@googlegroups.com

bitwiseman@gmail.com (JIRA)

unread,
Mar 27, 2019, 6:06:04 PM3/27/19
to jenkinsc...@googlegroups.com

forbes.al@gmail.com (JIRA)

unread,
May 24, 2019, 5:59:03 AM5/24/19
to jenkinsc...@googlegroups.com
Al Forbes commented on Bug JENKINS-46094
 
Re: "Checkout over SSH" fails the build since it still uses HTTPS urls

https://github.com/jenkinsci/bitbucket-branch-source-plugin/releases

I did not find the 2.4.5 release. Are publish and release different things? If someone has time, a 2.4.5 release would be highly appreciated.

bitwiseman@gmail.com (JIRA)

unread,
May 24, 2019, 10:55:02 AM5/24/19
to jenkinsc...@googlegroups.com

Al Forbes
2.4.5 of github branch source.
For bitbucket, the fix is in 2.4.2.

bitwiseman@gmail.com (JIRA)

unread,
May 25, 2019, 11:06:03 PM5/25/19
to jenkinsc...@googlegroups.com

matthijzk@gmail.com (JIRA)

unread,
Jun 20, 2019, 4:55:02 AM6/20/19
to jenkinsc...@googlegroups.com
Matthijs Kool commented on Bug JENKINS-46094
 
Re: "Checkout over SSH" fails the build since it still uses HTTPS urls

It appears this issue (or something very similar) is also present in the Gitea plugin. I have a Gitea organization configured with "Checkout over SSH" enabled. This works fine as long as Jenkins is not restarted. After a Jenkins restart, the build attempts to git clone using HTTP(s) instead of SSH. If I then click the "Scan Gitea Organization Now" button, the build again uses SSH.

Jenkins version 2.176.1
Gitea plugin version 1.1.2

Reply all
Reply to author
Forward
0 new messages