<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Login Jenkins Archives - scmGalaxy</title>
	<atom:link href="https://www.scmgalaxy.com/tutorials/tag/login-jenkins/feed/" rel="self" type="application/rss+xml" />
	<link>https://www.scmgalaxy.com/tutorials/tag/login-jenkins/</link>
	<description>A Platform for Software Engineers</description>
	<lastBuildDate>Sat, 27 Feb 2021 09:52:42 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=7.1</generator>
	<item>
		<title>Jenkins Command line Reference for login and trigger a job</title>
		<link>https://www.scmgalaxy.com/tutorials/jenkins-command-line-reference-for-login-and-trigger-a-job/</link>
					<comments>https://www.scmgalaxy.com/tutorials/jenkins-command-line-reference-for-login-and-trigger-a-job/#comments</comments>
		
		<dc:creator><![CDATA[scmgalaxy K]]></dc:creator>
		<pubDate>Thu, 05 Feb 2015 00:00:00 +0000</pubDate>
				<category><![CDATA[Jenkins]]></category>
		<category><![CDATA[Command line]]></category>
		<category><![CDATA[How]]></category>
		<category><![CDATA[How to login in Jenkins]]></category>
		<category><![CDATA[How to trigger a job in Jenkins]]></category>
		<category><![CDATA[Jenkins Command line]]></category>
		<category><![CDATA[Jenkins Command line Guide]]></category>
		<category><![CDATA[Jenkins Command line Reference]]></category>
		<category><![CDATA[Jenkins Command line Tutorial]]></category>
		<category><![CDATA[job]]></category>
		<category><![CDATA[Login]]></category>
		<category><![CDATA[Login Jenkins]]></category>
		<category><![CDATA[Process]]></category>
		<category><![CDATA[Reference]]></category>
		<category><![CDATA[Steps]]></category>
		<category><![CDATA[Trigger]]></category>
		<category><![CDATA[Ways]]></category>
		<guid isPermaLink="false">http://www.scmgalaxy.com/tutorials/2015/02/05/jenkins-command-line-reference-for-login-and-trigger-a-job/</guid>

					<description><![CDATA[<p>Grep will return 0 while the build is running: $ curl http://myjenkins/job/myjob/lastBuild/api/json &#124; grep &#8211;color result\&#8221;:null $ echo $? Trigger [&#8230;]</p>
<p>The post <a href="https://www.scmgalaxy.com/tutorials/jenkins-command-line-reference-for-login-and-trigger-a-job/">Jenkins Command line Reference for login and trigger a job</a> appeared first on <a href="https://www.scmgalaxy.com/tutorials">scmGalaxy</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p><img fetchpriority="high" decoding="async" class="alignnone size-full wp-image-3535 aligncenter" src="https://www.scmgalaxy.com/tutorials/wp-content/uploads/2015/02/jenkins-command-line-refere.png" alt="jenkins-command-line-reference" width="600" height="400" srcset="https://www.scmgalaxy.com/tutorials/wp-content/uploads/2015/02/jenkins-command-line-refere.png 600w, https://www.scmgalaxy.com/tutorials/wp-content/uploads/2015/02/jenkins-command-line-refere-300x200.png 300w" sizes="(max-width: 600px) 100vw, 600px" /></p>
<p><b>Grep will return 0 while the build is running:</b></p>
<p>$ curl http://myjenkins/job/myjob/lastBuild/api/json | grep &#8211;color result\&#8221;:null</p>
<p>$ echo $?</p>
<p><strong>Trigger a Jenkins Job from command line</strong></p>
<p>$ wget http://yourserver/job/MyJobname/build?delay=0sec</p>
<p>$ wget -O &#8211; $HUDSON_URL/job/JOBNAME/build</p>
<p><strong>Trigger a Jenkins Job without authentication</strong></p>
<p>$ curl http://jenkins:8080/job/my%20job/build</p>
<p><strong>Trigger a Jenkins Job with authentication</strong></p>
<p>$ curl &#8211;user dbacher:$MY_API_TOKEN http://jenkins:8080/job/my%20job/build</p>
<p>$ curl &#8211;user &lt;your_jenkins_username&gt;:&lt;your_jenkins_API_key&gt; http://&lt;jenkins_server_url&gt;/job/&lt;your_jenkins_job_name&gt;/build</p>
<p><strong>Running commands against a secure Jenkins (basic auth or ssh keys)</strong></p>
<p>$ java -jar jenkins-cli.jar -s http://myjenkins help &#8211;username me &#8211;password mypassword</p>
<p>$ java -jar jenkins-cli.jar -s http://myjenkins help -i ~/.ssh/id_rsa</p>
<p><strong>Triggering a job build against a secure Jenkins (avoiding a 1.5 year old open bug!)</strong></p>
<p>$ java -jar jenkins-cli.jar -s http://myjenkins build &#8216;My Awesome Jenkins Job&#8217; -i ~/.ssh/id_rsa</p>
<p>$ java -jar jenkins-cli.jar -s http://myjenkins build &#8216;My Awesome Jenkins Job&#8217; -i ~/.ssh/id_rsa -s -v</p>
<p><strong>Passing parameters when triggering a job build</strong></p>
<p>$ java -jar jenkins-cli.jar -s http://myjenkins build &#8216;Deploy XYZ App&#8217; -i ~/.ssh/id_rsa -s -v -p target_env=api.cloudfoundry.com -p branch=master</p>
<p><strong>Reference</strong></p>
<p><a href="http://starkandwayne.com/articles/2013/04/12/jenkins-builds-from-cli/" target="_blank" rel="noopener">http://starkandwayne.com/articles/2013/04/12/jenkins-builds-from-cli/</a></p>
<p><a href="http://www.scmgalaxy.com/index.php?option=com_k2&amp;view=item&amp;id=890:ways-to-login-jenkins-using-command-line&amp;Itemid=120" target="_blank" rel="noopener">http://www.scmgalaxy.com/index.php?option=com_k2&amp;view=item&amp;id=890:ways-to-login-jenkins-using-command-line&amp;Itemid=120</a></p>
<p><strong>Appendix</strong></p>
<p>1. How to get your_jenkins_API_key?</p>
<ul>
<li>Login to your Jenkins.</li>
<li>Click on the username in the top right.</li>
<li>Click on Configure.</li>
<li>Click on ‘Show API Token’ button.</li>
<li>You got it.</li>
</ul>
<p>The post <a href="https://www.scmgalaxy.com/tutorials/jenkins-command-line-reference-for-login-and-trigger-a-job/">Jenkins Command line Reference for login and trigger a job</a> appeared first on <a href="https://www.scmgalaxy.com/tutorials">scmGalaxy</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.scmgalaxy.com/tutorials/jenkins-command-line-reference-for-login-and-trigger-a-job/feed/</wfw:commentRss>
			<slash:comments>2</slash:comments>
		
		
			</item>
		<item>
		<title>What are the ways to Login Jenkins using Command line ?</title>
		<link>https://www.scmgalaxy.com/tutorials/ways-to-login-jenkins-using-command-line/</link>
					<comments>https://www.scmgalaxy.com/tutorials/ways-to-login-jenkins-using-command-line/#comments</comments>
		
		<dc:creator><![CDATA[scmgalaxy K]]></dc:creator>
		<pubDate>Tue, 27 May 2014 00:00:00 +0000</pubDate>
				<category><![CDATA[Jenkins]]></category>
		<category><![CDATA[Command line]]></category>
		<category><![CDATA[Commands for login in Jenkins]]></category>
		<category><![CDATA[Guide]]></category>
		<category><![CDATA[How]]></category>
		<category><![CDATA[Jenkins Guide]]></category>
		<category><![CDATA[Jenkins Login]]></category>
		<category><![CDATA[Jenkins login by command line]]></category>
		<category><![CDATA[Jenkins login through command line]]></category>
		<category><![CDATA[Jenkins Tutorial]]></category>
		<category><![CDATA[Login]]></category>
		<category><![CDATA[Login Jenkins]]></category>
		<category><![CDATA[Login Jenkins using Command line]]></category>
		<category><![CDATA[Process]]></category>
		<category><![CDATA[Tutorial]]></category>
		<category><![CDATA[Ways]]></category>
		<category><![CDATA[What]]></category>
		<guid isPermaLink="false">http://www.scmgalaxy.com/tutorials/2014/05/27/ways-to-login-jenkins-using-command-line/</guid>

					<description><![CDATA[<p>Ways to Login Jenkins using Command line &#38; Way to trigger Jenkins job using Command line or script Wget Note: [&#8230;]</p>
<p>The post <a href="https://www.scmgalaxy.com/tutorials/ways-to-login-jenkins-using-command-line/">What are the ways to Login Jenkins using Command line ?</a> appeared first on <a href="https://www.scmgalaxy.com/tutorials">scmGalaxy</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p><img decoding="async" class="alignnone wp-image-3719 size-full" src="https://www.scmgalaxy.com/tutorials/wp-content/uploads/2014/05/jenkins-login-command-line.png" alt="login-jenkins-using-command-line" width="600" height="400" srcset="https://www.scmgalaxy.com/tutorials/wp-content/uploads/2014/05/jenkins-login-command-line.png 600w, https://www.scmgalaxy.com/tutorials/wp-content/uploads/2014/05/jenkins-login-command-line-300x200.png 300w" sizes="(max-width: 600px) 100vw, 600px" /></p>
<p><strong>Ways to Login Jenkins using Command line</strong></p>
<p><strong>&amp;</strong></p>
<p><strong>Way to trigger Jenkins job using Command line or script</strong></p>
<h3>Wget</h3>
<p>Note: If you are using wget 1.11, you might need to use the following options:</p>
<div class="code panel" style="border-width: 1px;">
<div class="codeContent panelContent">
<pre class="code-java"> wget --auth-no-challenge --http-user=user --http-password=apiToken http:<span class="code-comment">//jenkins.yourcompany.com/job/your_job/build?token=TOKEN</span></pre>
</div>
</div>
<p>With wget 1.10.x the following is enough (but will not work with 1.11.x) :</p>
<div class="code panel" style="border-width: 1px;">
<div class="codeContent panelContent">
<pre class="code-java"> wget http:<span class="code-comment">//user:apiToken@jenkins.yourcompany.com/job/your_job/build?token=TOKEN
</span></pre>
<p>ex &#8211; wget http://yourserver/job/MyJobname/build?delay=0sec</p>
<h3>CURL</h3>
<p><strong>Without authentication:</strong></p>
<p><code>$ curl http://jenkins:8080/job/my%20job/build [ HTML page saying "Authentication required" ] </code></p>
<p><strong>With authentication:</strong></p>
<p><code>$ curl --user dbacher:$MY_API_TOKEN http://jenkins:8080/job/my%20job/build [ returns nothing and the build starts ] </code></p>
<pre class="code-java">curl -X POST http://server/view/name/job/jobname/build?delay=0sec --user 1019352:61bb8531292794315f5dda8113548630</pre>
</div>
</div>
<p>Login Jenkins using groovy script or Perl Script or Java, please refer the reference page&#8230;</p>
<p><strong>Reference:</strong><br />
<a href="https://wiki.jenkins-ci.org/display/JENKINS/Authenticating+scripted+clients">https://wiki.jenkins-ci.org/display/JENKINS/Authenticating+scripted+clients</a></p>
<p><a href="https://wiki.jenkins-ci.org/display/JENKINS/Remote+access+API">https://wiki.jenkins-ci.org/display/JENKINS/Remote+access+API</a></p>
<p>The post <a href="https://www.scmgalaxy.com/tutorials/ways-to-login-jenkins-using-command-line/">What are the ways to Login Jenkins using Command line ?</a> appeared first on <a href="https://www.scmgalaxy.com/tutorials">scmGalaxy</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.scmgalaxy.com/tutorials/ways-to-login-jenkins-using-command-line/feed/</wfw:commentRss>
			<slash:comments>2</slash:comments>
		
		
			</item>
	</channel>
</rss>
