• poudriere using git+ssh and private key?

    From Ronald Klop@ronald-lists@klop.ws to muc.lists.freebsd.ports on Thu Jun 18 11:50:01 2026
    From Newsgroup: muc.lists.freebsd.ports

    ------=_Part_116603_653923941.1781776201705
    Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit

    Hi,

    I'm improving my poudriere setup to get the ports tree via git+ssh.

    poudriere ports -c -f "dummypool/poudriere/ports/branchX" -m git+ssh -B "branchX" -p "test" -U ssh://ronald@<githost>/usr/ports

    This works from the command line, but it all runs from Jenkins so I don't want interactive passwords for ssh.
    How do I pass an ssh private key to the git/ssh invocation?

    Regards,
    Ronald.

    ------=_Part_116603_653923941.1781776201705
    Content-Type: text/html; charset=us-ascii
    Content-Transfer-Encoding: 7bit

    <html><head></head><body>Hi,<br>

    I'm improving my poudriere setup to get the ports tree via git+ssh.<br>

    poudriere ports -c -f "dummypool/poudriere/ports/branchX" -m git+ssh -B "branchX" -p "test" -U ssh://ronald@&lt;githost&gt;/usr/ports<br>

    This works from the command line, but it all runs from Jenkins so I don't want interactive passwords for ssh.<br>
    How do I pass an ssh private key to the git/ssh invocation?<br>

    Regards,<br>
    Ronald.<br>
    &nbsp;</body></html>
    ------=_Part_116603_653923941.1781776201705--


    --
    Posted automagically by a mail2news gateway at muc.de e.V.
    Please direct questions, flames, donations, etc. to news-admin@muc.de
    --- Synchronet 3.22a-Linux NewsLink 1.2
  • From Michael Gmelin@grembo@freebsd.org to muc.lists.freebsd.ports on Thu Jun 18 12:03:12 2026
    From Newsgroup: muc.lists.freebsd.ports


    On 18. Jun 2026, at 11:51, Ronald Klop <ronald-lists@klop.ws> wrote:

    N++Hi,

    I'm improving my poudriere setup to get the ports tree via git+ssh.

    poudriere ports -c -f "dummypool/poudriere/ports/branchX" -m git+ssh -B "branchX" -p "test" -U ssh://ronald@<githost>/usr/ports

    This works from the command line, but it all runs from Jenkins so I don't want interactive passwords for ssh.
    How do I pass an ssh private key to the git/ssh invocation?
    Two simple options:
    1. Change ~/.ssh/config to include the private key
    2. And/or load the private key into ssh-agent
    -m
    --
    Posted automagically by a mail2news gateway at muc.de e.V.
    Please direct questions, flames, donations, etc. to news-admin@muc.de
    --- Synchronet 3.22a-Linux NewsLink 1.2
  • From Benjamin Jacobs@freebsd@dev.thsi.be to muc.lists.freebsd.ports on Thu Jun 18 12:07:59 2026
    From Newsgroup: muc.lists.freebsd.ports

    On Thu, 18 Jun 2026 11:50:01 +0200 (CEST)
    Ronald Klop <ronald-lists@klop.ws> wrote:

    Hi,

    I'm improving my poudriere setup to get the ports tree via git+ssh.

    poudriere ports -c -f "dummypool/poudriere/ports/branchX" -m git+ssh
    -B "branchX" -p "test" -U ssh://ronald@<githost>/usr/ports

    This works from the command line, but it all runs from Jenkins so I
    don't want interactive passwords for ssh. How do I pass an ssh
    private key to the git/ssh invocation?

    Regards,
    Ronald.


    Hi,

    If you have the private key registered in Jenkins' credential store,
    you should be able to do that with the sshagent step, see: https://www.jenkins.io/doc/pipeline/steps/ssh-agent/

    If not then you'd want to configure ssh authentication as usual, for
    example by generating a key and copying its public counter part to the repository, and/or setup the ~/.ssh/config accordingly.

    Best regards,

    Benjamin


    --
    Posted automagically by a mail2news gateway at muc.de e.V.
    Please direct questions, flames, donations, etc. to news-admin@muc.de
    --- Synchronet 3.22a-Linux NewsLink 1.2
  • From Ronald Klop@ronald-lists@klop.ws to muc.lists.freebsd.ports on Thu Jun 18 12:23:48 2026
    From Newsgroup: muc.lists.freebsd.ports

    ------=_Part_116205_1638998967.1781778228142
    Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit

    Thanks all for the suggestions. I figured it out.
    I needed to find out as which user this part of the Jenkins job was running and set the private key up in the right spot. Sometimes it is so simple in hindsight.

    This ssh-agent step in Jenkins will be a nice addition for the future me.

    Thanks and regards,
    Ronald.


    Van: Benjamin Jacobs <freebsd@dev.thsi.be>
    Datum: donderdag, 18 juni 2026 12:07
    Aan: Ronald Klop <ronald-lists@klop.ws>
    CC: ports@freebsd.org
    Onderwerp: Re: poudriere using git+ssh and private key?

    On Thu, 18 Jun 2026 11:50:01 +0200 (CEST)
    Ronald Klop <ronald-lists@klop.ws> wrote:

    Hi,

    I'm improving my poudriere setup to get the ports tree via git+ssh.

    poudriere ports -c -f "dummypool/poudriere/ports/branchX" -m git+ssh
    -B "branchX" -p "test" -U ssh://ronald@<githost>/usr/ports

    This works from the command line, but it all runs from Jenkins so I
    don't want interactive passwords for ssh. How do I pass an ssh
    private key to the git/ssh invocation?

    Regards,
    Ronald.


    Hi,

    If you have the private key registered in Jenkins' credential store,
    you should be able to do that with the sshagent step, see: https://www.jenkins.io/doc/pipeline/steps/ssh-agent/

    If not then you'd want to configure ssh authentication as usual, for
    example by generating a key and copying its public counter part to the repository, and/or setup the ~/.ssh/config accordingly.

    Best regards,

    Benjamin





    ------=_Part_116205_1638998967.1781778228142
    Content-Type: text/html; charset=us-ascii
    Content-Transfer-Encoding: 7bit

    <html><head></head><body>Thanks all for the suggestions. I figured it out.<br> I needed to find out as which user this part of the Jenkins job was running and set the private key up in the right spot. Sometimes it is so simple in hindsight.<br>

    This ssh-agent step in Jenkins will be a nice addition for the future me.<br>

    Thanks and regards,<br>
    Ronald.<br>

    &nbsp;
    <p><strong>Van:</strong> Benjamin Jacobs &lt;freebsd@dev.thsi.be&gt;<br> <strong>Datum:</strong> donderdag, 18 juni 2026 12:07<br>
    <strong>Aan:</strong> Ronald Klop &lt;ronald-lists@klop.ws&gt;<br> <strong>CC:</strong> ports@freebsd.org<br>
    <strong>Onderwerp:</strong> Re: poudriere using git+ssh and private key?</p>

    <blockquote style="padding-right: 0px; padding-left: 5px; margin-left: 5px; border-left: #000000 2px solid; margin-right: 0px">
    <div class="MessageRFC822Viewer" id="P">
    <div class="TextPlainViewer" id="P.P">On Thu, 18 Jun 2026 11:50:01 +0200 (CEST)<br>
    Ronald Klop &lt;ronald-lists@klop.ws&gt; wrote:<br>

    &gt; Hi,<br>
    &gt;<br>
    &gt; I'm improving my poudriere setup to get the ports tree via git+ssh.<br> &gt;<br>
    &gt; poudriere ports -c -f "dummypool/poudriere/ports/branchX" -m git+ssh<br> &gt; -B "branchX" -p "test" -U ssh://ronald@&lt;githost&gt;/usr/ports<br> &gt;<br>
    &gt; This works from the command line, but it all runs from Jenkins so I<br> &gt; don't want interactive passwords for ssh. How do I pass an ssh<br>
    &gt; private key to the git/ssh invocation?<br>
    &gt;<br>
    &gt; Regards,<br>
    &gt; Ronald.<br>
    &gt; &nbsp;<br>

    Hi,<br>

    If you have the private key registered in Jenkins' credential store,<br>
    you should be able to do that with the sshagent step, see:<br>
    <a href="https://www.jenkins.io/doc/pipeline/steps/ssh-agent/">https://www.jenkins.io/doc/pipeline/steps/ssh-agent/</a><br>

    If not then you'd want to configure ssh authentication as usual, for<br> example by generating a key and copying its public counter part to the<br> repository, and/or setup the ~/.ssh/config accordingly.<br>

    Best regards,<br>

    Benjamin</div>

    <hr></div>
    </blockquote>

    &nbsp;</body></html>
    ------=_Part_116205_1638998967.1781778228142--


    --
    Posted automagically by a mail2news gateway at muc.de e.V.
    Please direct questions, flames, donations, etc. to news-admin@muc.de
    --- Synchronet 3.22a-Linux NewsLink 1.2