<?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>CI/CD | SDT 攻城獅區</title>
	<atom:link href="https://sdt.hameba.tw/tag/ci-cd/feed/" rel="self" type="application/rss+xml" />
	<link>https://sdt.hameba.tw</link>
	<description>由Steven, Der, Ted 三位高級打字員所組成，是三位工程師(攻城獅)所維護的技術分享平台，或許偶爾會分享一些日常，有任何問題或是錯誤的部分，歡迎留言告訴我們！</description>
	<lastBuildDate>Fri, 28 Feb 2020 08:16:43 +0800</lastBuildDate>
	<language>zh-TW</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=5.3</generator>

<image>
	<url>https://sdt.hameba.tw/wp-content/uploads/2020/02/hameba_favicon-150x150.png</url>
	<title>CI/CD | SDT 攻城獅區</title>
	<link>https://sdt.hameba.tw</link>
	<width>32</width>
	<height>32</height>
</image> 
	<item>
		<title>ssh 登入 遠端電腦不用密碼</title>
		<link>https://sdt.hameba.tw/588/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=ssh-%25e7%2599%25bb%25e5%2585%25a5-%25e9%2581%25a0%25e7%25ab%25af%25e9%259b%25bb%25e8%2585%25a6%25e4%25b8%258d%25e7%2594%25a8%25e5%25af%2586%25e7%25a2%25bc</link>
				<comments>https://sdt.hameba.tw/588/#respond</comments>
				<pubDate>Fri, 28 Feb 2020 08:16:43 +0000</pubDate>
		<dc:creator><![CDATA[Hsu Steven]]></dc:creator>
				<category><![CDATA[System]]></category>
		<category><![CDATA[CI/CD]]></category>
		<category><![CDATA[ssh]]></category>
		<category><![CDATA[without password]]></category>

		<guid isPermaLink="false">https://sdt.hameba.tw/?p=588</guid>
				<description><![CDATA[<p>最近做jenkins CI/CD 要跨內部server發現登入ssh需要密碼， 真的滿麻煩，也不能在shell &#8230; </p>
<p class="link-more"><a href="https://sdt.hameba.tw/588/" class="more-link">閱讀全文<span class="screen-reader-text">〈ssh 登入 遠端電腦不用密碼〉</span></a></p>
The post <a href="https://sdt.hameba.tw/588/">ssh 登入 遠端電腦不用密碼</a> first appeared on <a href="https://sdt.hameba.tw">SDT 攻城獅區</a>.]]></description>
								<content:encoded><![CDATA[<p>最近做jenkins CI/CD 要跨內部server發現登入ssh需要密碼，</p>
<p>真的滿麻煩，也不能在shellscript把密碼直接放入，<span id="more-588"></span></p>
<p>只好讓兩台server client -&gt; server 免除認證，</p>
<p>步驟1. 至client server(這邊對我來說是jenkins這台server)</p><pre class="crayon-plain-tag">//client 建立自己的ssh ras憑證
$ ssh-keygen
Generating public/private rsa key pair.
Enter file in which to save the key (/root/.ssh/id_rsa): 
Enter passphrase (empty for no passphrase): 
Enter same passphrase again: 
Your identification has been saved in /root/.ssh/id_rsa.
Your public key has been saved in /root/.ssh/id_rsa.pub.
The key fingerprint is:
c3:e9:25:65:00:c8:65:cb:e8:fe:4e:7e:ce:06:a4:9d root@kvm8.deyu.wang
The key's randomart image is:
+--[ RSA 2048]----+
|   . o+..        |
|    o+ . .       |
|    . o   o      |
|   .  .. +       |
|    .+ .S .      |
|   .. E. +       |
|    . ...        |
|     + .o        |
|     .++o        |
+-----------------+

// 將client的pub放到server，該user 家目錄下
$ scp ~/.ssh/id_rsa.pub serverUser@serverIP:~/</pre><p>步驟2. 切換到 目標Server</p><pre class="crayon-plain-tag">// ssh 目標server，這時進去還需要需入密碼
$ ssh serverUser@serverIP

// 把剛剛client傳過來的id_rsa.pub寫入authorized_keys
$ cat ~/id_rsa.pub &gt;&gt; ~/.ssh/authorized_keys

// 離開
$ exit

// 測試ssh連線，如設定成功，就不需要密碼即可以進入
$ ssh serverUser@serverIP</pre><p>&nbsp;</p>
<p>Reference</p>
<p><a href="https://dywang.csie.cyut.edu.tw/dywang/security/node84.html" target="_blank" rel="noopener noreferrer">https://dywang.csie.cyut.edu.tw/dywang/security/node84.html</a></p>The post <a href="https://sdt.hameba.tw/588/">ssh 登入 遠端電腦不用密碼</a> first appeared on <a href="https://sdt.hameba.tw">SDT 攻城獅區</a>.]]></content:encoded>
							<wfw:commentRss>https://sdt.hameba.tw/588/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
							</item>
		<item>
		<title>Ubuntu 安裝 Jenkins 並啟用</title>
		<link>https://sdt.hameba.tw/375/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=ubuntu-%25e5%25ae%2589%25e8%25a3%259d-jenkins</link>
				<comments>https://sdt.hameba.tw/375/#respond</comments>
				<pubDate>Wed, 25 Dec 2019 08:41:43 +0000</pubDate>
		<dc:creator><![CDATA[Hsu Steven]]></dc:creator>
				<category><![CDATA[Software]]></category>
		<category><![CDATA[System]]></category>
		<category><![CDATA[CD]]></category>
		<category><![CDATA[CI]]></category>
		<category><![CDATA[CI/CD]]></category>
		<category><![CDATA[Jenkins]]></category>
		<category><![CDATA[Ubuntu]]></category>

		<guid isPermaLink="false">https://sdt.hameba.tw/?p=375</guid>
				<description><![CDATA[<p>現在很流行CI/CD，所以作者來試試看安裝Jenkins配合ShellScript， 以前都是寫crontab &#8230; </p>
<p class="link-more"><a href="https://sdt.hameba.tw/375/" class="more-link">閱讀全文<span class="screen-reader-text">〈Ubuntu 安裝 Jenkins 並啟用〉</span></a></p>
The post <a href="https://sdt.hameba.tw/375/">Ubuntu 安裝 Jenkins 並啟用</a> first appeared on <a href="https://sdt.hameba.tw">SDT 攻城獅區</a>.]]></description>
								<content:encoded><![CDATA[<p>現在很流行CI/CD，所以作者來試試看安裝Jenkins配合ShellScript，</p>
<p>以前都是寫crontab每天定時執行ShellScript，</p>
<p>現在用bitbucket webhook Jenkins達到master push 直接更新code。</p>
<p><span id="more-375"></span></p>
<p>安裝步驟</p><pre class="crayon-plain-tag">$ sudo apt-get update

# Jenkins是java 所以需要jdk用8即可
$ sudo apt-get install openjdk-8-jdk

$ wget -q -O - https://pkg.jenkins.io/debian/jenkins-ci.org.key | sudo apt-key add -

#將Jenkins添加到系統
$ sudo sh -c 'echo deb http://pkg.jenkins.io/debian-stable binary/ &gt; /etc/apt/sources.list.d/jenkins.list'

$ sudo apt-get update

# 安裝Jenkins
$ sudo apt-get install jenkins</pre><p>完成後，可以用以下指令觀看系統狀況</p><pre class="crayon-plain-tag"># jenkins 狀況
$ sudo service jenkins status

# jenkins 啟動
$ sudo service jenkins start

# jenkins 停止
$ sudo service jenkins stop

# jenkins 重啟
$ sudo service jenkins restart

# jenkins 開機啟動
$ sudo systemctl enable jenkins</pre><p>完成後到網頁 127.0.0.1:8080，會要求輸入密碼</p><pre class="crayon-plain-tag">cat /var/lib/jenkins/secrets/initialAdminPassword</pre><p>顯示的密碼直接輸入即可</p>
<p>選擇左邊 &#8220;install suggest plugin&#8221; 標準安裝。</p>
<p>作者在安裝過程中發生安裝失敗的問題，可能是<span style="color: #ff0000">來源端Jenkins plugin Server異常</span>，可以稍後再重試，正常點擊install suggest plugin後，大概5分鐘就可以安裝完，且不會有progress lock的感覺。</p>
<p>進入Jenkins系統後，會要求輸入新的使用者及密碼。</p>
<p>大致這樣就完成Jenkins的安裝及啟用。</p>
<p>Reference</p>
<p><a href="https://easonwang01.gitbooks.io/class/jenkinsbitbucket.html">https://easonwang01.gitbooks.io/class/jenkinsbitbucket.html</a></p>
<p><a href="https://linuxhostsupport.com/blog/how-to-install-jenkins-on-ubuntu-18-04/">https://linuxhostsupport.com/blog/how-to-install-jenkins-on-ubuntu-18-04/</a></p>The post <a href="https://sdt.hameba.tw/375/">Ubuntu 安裝 Jenkins 並啟用</a> first appeared on <a href="https://sdt.hameba.tw">SDT 攻城獅區</a>.]]></content:encoded>
							<wfw:commentRss>https://sdt.hameba.tw/375/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
							</item>
	</channel>
</rss>
