<?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>git &#8211; 這世上 沒有偶然 只有必然</title>
	<atom:link href="https://wordpress.lokidea.com/tag/git/feed/" rel="self" type="application/rss+xml" />
	<link>https://wordpress.lokidea.com</link>
	<description>幻幽的小小分享區</description>
	<lastBuildDate>Mon, 18 May 2020 06:50:36 +0000</lastBuildDate>
	<language>zh-TW</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	
	<item>
		<title>網站更新 memo</title>
		<link>https://wordpress.lokidea.com/2009/%e7%b6%b2%e7%ab%99%e6%9b%b4%e6%96%b0-memo/</link>
					<comments>https://wordpress.lokidea.com/2009/%e7%b6%b2%e7%ab%99%e6%9b%b4%e6%96%b0-memo/#respond</comments>
		
		<dc:creator><![CDATA[Barney Chen]]></dc:creator>
		<pubDate>Mon, 18 May 2020 06:44:59 +0000</pubDate>
				<category><![CDATA[後端]]></category>
		<category><![CDATA[必然]]></category>
		<category><![CDATA[網站研究]]></category>
		<category><![CDATA[網站記錄]]></category>
		<category><![CDATA[隨便聊聊]]></category>
		<category><![CDATA[docker]]></category>
		<category><![CDATA[git]]></category>
		<category><![CDATA[ubuntu]]></category>
		<category><![CDATA[wordpress]]></category>
		<guid isPermaLink="false">https://wordpress.lokidea.com/?p=2009</guid>

					<description><![CDATA[這台主機丟在 do 上面，最近發現之前那台主機不能更新 ubuntu 16.04.4 怎麼更新都有問題 只好重 &#8230; <a href="https://wordpress.lokidea.com/2009/%e7%b6%b2%e7%ab%99%e6%9b%b4%e6%96%b0-memo/" class="more-link">閱讀全文 <span class="screen-reader-text">網站更新 memo</span></a>]]></description>
										<content:encoded><![CDATA[
<p>這台主機丟在 do 上面，最近發現之前那台主機不能更新</p>



<p>ubuntu 16.04.4 怎麼更新都有問題</p>



<p>只好重開一台 20.04 起來用</p>



<p>也把部落格先搬到新主機上面</p>



<p>列一下安裝遇到的問題與學習</p>



<p>安裝了不少東西</p>



<ul class="wp-block-list"><li>LAMP</li><li>wordpress (包含需要的 <a rel="noreferrer noopener" href="https://make.wordpress.org/hosting/handbook/handbook/server-environment/#php-extensions" target="_blank">php extension</a>)</li><li>wordpress優化</li><li>webmin</li><li>加上了swap</li></ul>



<p>也列一下想學習的項目：</p>



<ul class="wp-block-list"><li>git</li><li>docker</li><li>k8s</li><li>Powershell</li><li>git bash</li></ul>



<p>除錯原來舊主機也查了點文章</p>



<ul class="wp-block-list"><li>git 安裝到最新版本</li><li>ssh 金鑰安裝</li></ul>



<span id="more-2009"></span>



<p>更多內容就參考我丟在 <a rel="noreferrer noopener" href="https://gist.github.com/Barneybook/f3693e7cd499097477ba729232000087" target="_blank">gist的memo</a> 吧</p>



<script src="https://gist.github.com/Barneybook/f3693e7cd499097477ba729232000087.js"></script>
]]></content:encoded>
					
					<wfw:commentRss>https://wordpress.lokidea.com/2009/%e7%b6%b2%e7%ab%99%e6%9b%b4%e6%96%b0-memo/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>Tower也開放windows版本的測試了【310/366】</title>
		<link>https://wordpress.lokidea.com/1323/tower%e4%b9%9f%e9%96%8b%e6%94%bewindows%e7%89%88%e6%9c%ac%e7%9a%84%e6%b8%ac%e8%a9%a6%e4%ba%86%e3%80%90310-366%e3%80%91/</link>
					<comments>https://wordpress.lokidea.com/1323/tower%e4%b9%9f%e9%96%8b%e6%94%bewindows%e7%89%88%e6%9c%ac%e7%9a%84%e6%b8%ac%e8%a9%a6%e4%ba%86%e3%80%90310-366%e3%80%91/#respond</comments>
		
		<dc:creator><![CDATA[Barney Chen]]></dc:creator>
		<pubDate>Sat, 05 Nov 2016 11:25:33 +0000</pubDate>
				<category><![CDATA[git]]></category>
		<category><![CDATA[每日一篇]]></category>
		<category><![CDATA[網路觀察]]></category>
		<category><![CDATA[git-tower]]></category>
		<category><![CDATA[tower]]></category>
		<category><![CDATA[windows]]></category>
		<guid isPermaLink="false">https://wordpress.lokidea.com/?p=1323</guid>

					<description><![CDATA[RSS訂閱裡 Hacker News 剛好有一篇貼了  tower 的新頁面 就發現 tower現在也開放wi &#8230; <a href="https://wordpress.lokidea.com/1323/tower%e4%b9%9f%e9%96%8b%e6%94%bewindows%e7%89%88%e6%9c%ac%e7%9a%84%e6%b8%ac%e8%a9%a6%e4%ba%86%e3%80%90310-366%e3%80%91/" class="more-link">閱讀全文 <span class="screen-reader-text">Tower也開放windows版本的測試了【310/366】</span></a>]]></description>
										<content:encoded><![CDATA[<p>RSS訂閱裡 <a href="https://news.ycombinator.com/news">Hacker News</a> 剛好有<a href="https://news.ycombinator.com/item?id=12883084">一篇</a>貼了  <a href="https://www.git-tower.com/">tower</a> 的新頁面<br />
就發現 tower現在也開放windows版本了<br />
目前 v1.0.0，開放測試中<br />
<img fetchpriority="high" decoding="async" class="aligncenter size-large wp-image-1324" src="https://wp2020.lokidea.com/wp-content/uploads/2016/11/screen-20161106193228001-1024x496.jpg" alt="screen-20161106193228001" width="840" height="407" /><br />
點選左下的黃色下載按鈕，然後填入信箱以後，點選取得測試版本<br />
<span id="more-1323"></span><br />
<img decoding="async" class="aligncenter size-large wp-image-1325" src="https://wp2020.lokidea.com/wp-content/uploads/2016/11/screen-20161106193430001-1024x496.jpg" alt="screen-20161106193430001" width="840" height="407" /><br />
先會收到一封驗證信箱的信件，點選「Yes, subscribe me to this list.」<br />
<img decoding="async" class="aligncenter size-large wp-image-1326" src="https://wp2020.lokidea.com/wp-content/uploads/2016/11/screen-20161106193731001-1024x975.jpg" alt="screen-20161106193731001" width="840" height="800" /><br />
上面點選以後，會跳轉到下面這個頁面，就是驗證成功跟訂閱完成的頁面<br />
<img loading="lazy" decoding="async" class="aligncenter size-large wp-image-1328" src="https://wp2020.lokidea.com/wp-content/uploads/2016/11/screen-20161106194851001-1024x496.jpg" alt="screen-20161106194851001" width="840" height="407" /><br />
接下來會收到一封下載連結的信件<br />
<img loading="lazy" decoding="async" class="aligncenter size-large wp-image-1329" src="https://wp2020.lokidea.com/wp-content/uploads/2016/11/screen-20161106195759001-821x1024.jpg" alt="screen-20161106195759001" width="821" height="1024" /><br />
點選 Download Now就可以下載Beta版的tower windows版本了</p>
<hr />
<p>第一次安裝會跳初次使用的設定頁面出來<br />
<img loading="lazy" decoding="async" class="aligncenter size-full wp-image-1330" src="https://wp2020.lokidea.com/wp-content/uploads/2016/11/screen-20161106190055001.jpg" alt="screen-20161106190055001" width="750" height="690" /><br />
Diff Tool可以選不一樣的工具，Merge Tool也是一樣<br />
<img loading="lazy" decoding="async" class="aligncenter size-full wp-image-1331" src="https://wp2020.lokidea.com/wp-content/uploads/2016/11/screen-20161106190104001.jpg" alt="screen-20161106190104001" width="750" height="690" /><br />
Service Accounts可以設定很多家的服務，包含 Github、Bitbucket、Gitlab、Visual Studio Team Services、Beanstalk、Github Enterprise、Bitbucket Server、GitLab Community/Enterprise、Visual Studio TFS、Perforce GitSwarm，共10個雲端服務<br />
<img loading="lazy" decoding="async" class="aligncenter size-full wp-image-1332" src="https://wp2020.lokidea.com/wp-content/uploads/2016/11/screen-20161106200941001.jpg" alt="screen-20161106200941001" width="833" height="386" /><br />
也會偵測本機上面有的git repos，可以選擇加入<br />
全都設定完成以後，就可以開始使用tower了<br />
<img loading="lazy" decoding="async" class="aligncenter size-large wp-image-1333" src="https://wp2020.lokidea.com/wp-content/uploads/2016/11/screen-20161106202320001-1024x546.jpg" alt="screen-20161106202320001" width="840" height="448" /><br />
這是用jquery repo來demo UI設計</p>
]]></content:encoded>
					
					<wfw:commentRss>https://wordpress.lokidea.com/1323/tower%e4%b9%9f%e9%96%8b%e6%94%bewindows%e7%89%88%e6%9c%ac%e7%9a%84%e6%b8%ac%e8%a9%a6%e4%ba%86%e3%80%90310-366%e3%80%91/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>在OSS上面匿名commit【32/366】</title>
		<link>https://wordpress.lokidea.com/515/%e5%9c%a8oss%e4%b8%8a%e9%9d%a2%e5%8c%bf%e5%90%8dcommit%e3%80%9032-366%e3%80%91/</link>
					<comments>https://wordpress.lokidea.com/515/%e5%9c%a8oss%e4%b8%8a%e9%9d%a2%e5%8c%bf%e5%90%8dcommit%e3%80%9032-366%e3%80%91/#respond</comments>
		
		<dc:creator><![CDATA[Barney Chen]]></dc:creator>
		<pubDate>Mon, 01 Feb 2016 10:21:35 +0000</pubDate>
				<category><![CDATA[git]]></category>
		<category><![CDATA[每日一篇]]></category>
		<category><![CDATA[網路觀察]]></category>
		<category><![CDATA[gitmask]]></category>
		<guid isPermaLink="false">https://wordpress.lokidea.com/?p=515</guid>

					<description><![CDATA[在開放原始碼貢獻代碼 不代表要公開自己的名子 有工程師開源了一個 可以隱藏自己名稱的專案 讓你commit也可 &#8230; <a href="https://wordpress.lokidea.com/515/%e5%9c%a8oss%e4%b8%8a%e9%9d%a2%e5%8c%bf%e5%90%8dcommit%e3%80%9032-366%e3%80%91/" class="more-link">閱讀全文 <span class="screen-reader-text">在OSS上面匿名commit【32/366】</span></a>]]></description>
										<content:encoded><![CDATA[<p>在開放原始碼貢獻代碼<br />
不代表要公開自己的名子<br />
有工程師開源了一個<br />
可以隱藏自己名稱的專案<br />
讓你commit也可以匿名<br />
<span id="more-515"></span></p>
<blockquote><p>專案網址：<a href="http://www.gitmask.com/" target="_blank" rel="noopener noreferrer">http://www.gitmask.com/</a><br />
Github：<a href="https://github.com/AnalogJ/gitmask" target="_blank" rel="noopener noreferrer">https://github.com/AnalogJ/gitmask</a></p></blockquote>
<p>使用方法大家可以參考專案網站<br />
&nbsp;<br />
PS：<br />
文章終於寫到2月了!!<br />
還有11個月，加油!!</p>
]]></content:encoded>
					
					<wfw:commentRss>https://wordpress.lokidea.com/515/%e5%9c%a8oss%e4%b8%8a%e9%9d%a2%e5%8c%bf%e5%90%8dcommit%e3%80%9032-366%e3%80%91/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>使用Git的資安問題【6/366】</title>
		<link>https://wordpress.lokidea.com/431/%e4%bd%bf%e7%94%a8git%e7%9a%84%e8%b3%87%e5%ae%89%e5%95%8f%e9%a1%8c%e3%80%906-366%e3%80%91/</link>
					<comments>https://wordpress.lokidea.com/431/%e4%bd%bf%e7%94%a8git%e7%9a%84%e8%b3%87%e5%ae%89%e5%95%8f%e9%a1%8c%e3%80%906-366%e3%80%91/#respond</comments>
		
		<dc:creator><![CDATA[Barney Chen]]></dc:creator>
		<pubDate>Wed, 06 Jan 2016 00:30:31 +0000</pubDate>
				<category><![CDATA[每日一篇]]></category>
		<category><![CDATA[git]]></category>
		<category><![CDATA[主機管理]]></category>
		<category><![CDATA[資訊安全]]></category>
		<guid isPermaLink="false">https://wordpress.lokidea.com/?p=431</guid>

					<description><![CDATA[用Git也會有資安問題?? 我也是某天收到了封信件才知道這件事情 百度雲觀測寄了一封信來 內容如下： 概述 名 &#8230; <a href="https://wordpress.lokidea.com/431/%e4%bd%bf%e7%94%a8git%e7%9a%84%e8%b3%87%e5%ae%89%e5%95%8f%e9%a1%8c%e3%80%906-366%e3%80%91/" class="more-link">閱讀全文 <span class="screen-reader-text">使用Git的資安問題【6/366】</span></a>]]></description>
										<content:encoded><![CDATA[<p>用Git也會有資安問題??<br />
我也是某天收到了封信件才知道這件事情<br />
<a href="http://ce.baidu.com/" target="_blank" rel="noopener noreferrer">百度雲觀測</a>寄了一封信來<br />
內容如下：</p>
<table class=" alignleft" style="height: 78px;" border="0" width="595" cellspacing="0" cellpadding="0" align="left">
<thead>
<tr align="left">
<th>概述</th>
<th>名称</th>
<th>等级</th>
<th>来源</th>
</tr>
</thead>
<tbody>
<tr align="left">
<td>敏感信息泄露</td>
<td>git文件敏感信息泄露</td>
<td>低</td>
<td>安全漏洞</td>
</tr>
</tbody>
</table>
<p>&nbsp;</p>
<p style="text-align: left;">看到就想到，原來這也是一個重要的資訊安全問題<br />
主機底下的資料夾，其實不能隨意開放<br />
不需要的資料夾就不能給予外部存取<br />
PS:但是百度也太晚通知我，我猜它們也是最近才加入這部分的檢查</p>
<p style="text-align: left;"><span id="more-431"></span></p>
<p style="text-align: left;">重點就是.git/這個資料夾<br />
當你用git管理版本，在目錄底下 git init 以後<br />
.git/ 裡面就是整個版本控制的全部內容<br />
所以應該要隱藏起來<br />
至於怎麼隱藏的方法其實很多</p>
<ol>
<li style="text-align: left;">修改.htaccess檔案</li>
<li style="text-align: left;">修改http主機的路由設定</li>
</ol>
<p>這兩個方法都可以讓外部無法存取.git/這個資料夾<br />
因為我自己用Apache所以也只能用這兩種<br />
PS:希望未來有機會補上IIS跟nginx的做法</p>
<h6>修改.htaccess檔案</h6>
<p>加入一行</p>
<blockquote>
<pre><code>RedirectMatch 404 /\.git</code></pre>
</blockquote>
<p>資料參考：<a href="http://stackoverflow.com/questions/6142437/make-git-directory-web-inaccessible" target="_blank" rel="noopener noreferrer">.htaccess &#8211; Make .git directory web inaccessible &#8211; Stack Overflow</a></p>
<h6>修改http主機的路由設定</h6>
<p>因為使用Apache &#8211; Virtual Host 進行分配網域<br />
所以在設定apache的 *.conf 裡面加入一段</p>
<blockquote>
<div class="post-text">
<pre><code>&lt;Directorymatch &quot;^/.*/\.git/&quot;&gt;
Order deny,allow
Deny from all
&lt;/Directorymatch&gt;
</code></pre>
</div>
</blockquote>
<p>然後記得要 service apache2 reload<br />
資料參考：<a href="http://serverfault.com/questions/128069/how-do-i-prevent-apache-from-serving-the-git-directory" target="_blank" rel="noopener noreferrer">How do I prevent apache from serving the .git directory? &#8211; Server Fault</a><br />
其他連結參考：<br />
<a href="http://stackoverflow.com/questions/398008/deny-access-to-svn-folders-on-apache" target="_blank" rel="noopener noreferrer">Deny access to .svn folders on Apache &#8211; Stack Overflow</a><br />
也歡迎大家補充其他http主機的做法</p>
]]></content:encoded>
					
					<wfw:commentRss>https://wordpress.lokidea.com/431/%e4%bd%bf%e7%94%a8git%e7%9a%84%e8%b3%87%e5%ae%89%e5%95%8f%e9%a1%8c%e3%80%906-366%e3%80%91/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>Git 入門必備網站清單</title>
		<link>https://wordpress.lokidea.com/290/git-%e5%85%a5%e9%96%80%e5%bf%85%e5%82%99%e7%b6%b2%e7%ab%99%e6%b8%85%e5%96%ae/</link>
					<comments>https://wordpress.lokidea.com/290/git-%e5%85%a5%e9%96%80%e5%bf%85%e5%82%99%e7%b6%b2%e7%ab%99%e6%b8%85%e5%96%ae/#respond</comments>
		
		<dc:creator><![CDATA[Barney Chen]]></dc:creator>
		<pubDate>Thu, 25 Jun 2015 15:55:55 +0000</pubDate>
				<category><![CDATA[git]]></category>
		<category><![CDATA[全端之路]]></category>
		<category><![CDATA[後端]]></category>
		<category><![CDATA[list]]></category>
		<guid isPermaLink="false">https://wordpress.lokidea.com/?p=290</guid>

					<description><![CDATA[Git 官網 包含git各種gui的介紹與文件 msysgit git windows安裝環境 SourceT &#8230; <a href="https://wordpress.lokidea.com/290/git-%e5%85%a5%e9%96%80%e5%bf%85%e5%82%99%e7%b6%b2%e7%ab%99%e6%b8%85%e5%96%ae/" class="more-link">閱讀全文 <span class="screen-reader-text">Git 入門必備網站清單</span></a>]]></description>
										<content:encoded><![CDATA[<p><a href="http://git-scm.com/" target="_blank" rel="noopener noreferrer">Git 官網</a><br />
包含git各種gui的介紹與文件<br />
<a href="https://github.com/msysgit/git/" target="_blank" rel="noopener noreferrer">msysgit</a><br />
git windows安裝環境<br />
<a href="http://www.sourcetreeapp.com/" target="_blank" rel="noopener noreferrer">SourceTree</a><br />
git client GUI，Windows與Mac都支援<br />
<a href="https://github.com/TortoiseGit/TortoiseGit" target="_blank" rel="noopener noreferrer">TortoiseGit</a><br />
git client GUI，Windows使用<br />
<a href="https://github.com/" target="_blank" rel="noopener noreferrer">GitHub</a><br />
git web hosting，公開repo無限開，非公開需要付費<br />
<a href="https://bitbucket.org/" target="_blank" rel="noopener noreferrer">Bitbucket</a><br />
git web hosting，公開與非公開repo都可以無限開<br />
有限制共用最多五人，超過也是付費<br />
<a href="https://git-scm.com/book/zh-tw/v1" target="_blank" rel="noopener noreferrer">Pro Git</a><br />
官方的書籍，連結是中文翻譯<br />
<a href="https://ihower.tw/git/" target="_blank" rel="noopener noreferrer">https://ihower.tw/git/</a><br />
ihower的git中文教材頁面，有很詳細的文章與投影片<br />
<a href="http://blog.longwin.com.tw/2009/05/git-learn-initial-command-2009/" target="_blank" rel="noopener noreferrer">Git 初學筆記 &#8211; 指令操作教學</a><br />
Tsung&#8217;s Blog的指令入門教學，同站也有很多git文章</p>
]]></content:encoded>
					
					<wfw:commentRss>https://wordpress.lokidea.com/290/git-%e5%85%a5%e9%96%80%e5%bf%85%e5%82%99%e7%b6%b2%e7%ab%99%e6%b8%85%e5%96%ae/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>分享開發工具-GitUp</title>
		<link>https://wordpress.lokidea.com/246/%e5%88%86%e4%ba%ab%e9%96%8b%e7%99%bc%e5%b7%a5%e5%85%b7-gitup/</link>
					<comments>https://wordpress.lokidea.com/246/%e5%88%86%e4%ba%ab%e9%96%8b%e7%99%bc%e5%b7%a5%e5%85%b7-gitup/#respond</comments>
		
		<dc:creator><![CDATA[Barney Chen]]></dc:creator>
		<pubDate>Wed, 10 Jun 2015 15:55:33 +0000</pubDate>
				<category><![CDATA[git]]></category>
		<category><![CDATA[後端]]></category>
		<guid isPermaLink="false">https://wordpress.lokidea.com/?p=246</guid>

					<description><![CDATA[名稱：GitUp 網址：http://gitup.co/ 適用平台：Mac OS X 10.8 or late &#8230; <a href="https://wordpress.lokidea.com/246/%e5%88%86%e4%ba%ab%e9%96%8b%e7%99%bc%e5%b7%a5%e5%85%b7-gitup/" class="more-link">閱讀全文 <span class="screen-reader-text">分享開發工具-GitUp</span></a>]]></description>
										<content:encoded><![CDATA[<blockquote><p>名稱：GitUp<br />
網址：<a href="http://gitup.co/" target="_blank" rel="noopener noreferrer">http://gitup.co/</a><br />
適用平台：Mac OS X 10.8 or later</p></blockquote>
<p>感覺首頁上面的介紹很威<br />
所以就貼一下，有空再來補詳細介紹</p>
]]></content:encoded>
					
					<wfw:commentRss>https://wordpress.lokidea.com/246/%e5%88%86%e4%ba%ab%e9%96%8b%e7%99%bc%e5%b7%a5%e5%85%b7-gitup/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
	</channel>
</rss>
