Kaynağa Gözat

0667: Host Your Own GitHub Alternative with Gitea on Windows

i12bretro 3 yıl önce
ebeveyn
işleme
c602c40e8f
1 değiştirilmiş dosya ile 127 ekleme ve 0 silme
  1. 127 0
      0667.html

+ 127 - 0
0667.html

@@ -0,0 +1,127 @@
+    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+    <html lang="en" xmlns="http://www.w3.org/1999/xhtml">
+      <head>
+        <title>Host Your Own GitHub Alternative with Gitea on Windows</title>
+        <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
+								<script type="text/javascript" src="https://code.jquery.com/jquery-3.5.1.min.js"></script>
+				        <script type="text/javascript">
+          $(function(){
+            $('textarea').each(function(i,e){
+              theTextarea = $(this);
+              theTextarea.height((theTextarea[0].scrollHeight-5) +'px');
+            });
+
+            $('li').each(function(i,e){
+							if(!$(this).hasClass('noCheckbox')){
+								var uuid = 'li_' + Math.floor(Math.random() * Math.floor(1000000)).toString() + '_' + i.toString();
+								$(this).contents().wrap('<span id="'+ uuid +'"><label for="cb_'+ uuid +'"></label></span>');
+								$(this).prepend('<input type="checkbox" class="completeBox" id="cb_' + uuid +'" rel="'+ uuid +'" />')
+							}
+            });
+
+            $('code,div.codeBlock,textarea.codeBlock').each(function(i,e){
+              theElement = $(this);
+              var lines = theElement.html().split("\n");
+              theElement.empty();
+              for(l=0;l<lines.length;l++){
+                if($.trim(lines[l]) != '' && $.trim(lines[l]).substr(0,1) != '#' && $.trim(lines[l]).indexOf(' #') == -1 && lines[l].substr(0, 4).toUpperCase() != 'REM '){
+									                  theElement.append('<input type="image" src="images/clipboard.png" value="" class="copy-text" rel="copy_'+ i +'_'+ l +'" data-clipboard-text="'+ $.trim(lines[l].replace(/"/g, '&quot;')) +'" /><span id="copy_'+ i +'_'+ l +'">'+ lines[l] +'</span>');
+									                } else {
+                  theElement.append(lines[l]);
+                }
+              }
+            });
+
+            $(document).on('click','input.copy-text',function(){
+              theButton = $(this);
+														$('input.copy-text').attr('src','images/clipboard.png');
+							              $('span.copy-animation,span.copy-animation-ps').removeClass('copy-animation copy-animation-ps');
+              try {
+                if($('#'+ theButton.attr('rel')).parent('div').hasClass('PS')){
+                  $('#'+ theButton.attr('rel')).addClass('copy-animation-ps');
+								} else if($('#'+ theButton.attr('rel')).parent('div').hasClass('CMD')){
+									$('#'+ theButton.attr('rel')).addClass('copy-animation-cmd');
+                } else {
+                  $('#'+ theButton.attr('rel')).addClass('copy-animation');
+                }
+                navigator.clipboard.writeText(theButton.data('clipboard-text').replace(/<[^>]*>?/gm, ''));
+																theButton.attr('src','images/clipboard_active.png');
+								              } catch(err) {
+              }
+              return false;
+            });
+
+            $(document).on('click','input.completeBox',function(){
+              theBox = $(this);
+              $('#'+ theBox.attr('rel')).addClass('strikethrough');
+              theBox.prop('disabled',true);
+              theBox.parent('li').prevAll().each(function(i,e){
+                theLI = $(this);
+                if(theLI.find('input[type=checkbox]').not(':checked')){
+                  $('#'+ theLI.find('input[type=checkbox]').attr('rel')).addClass('strikethrough');
+                  theLI.find('input[type=checkbox]').prop('checked',true).prop('disabled',true);
+                }
+              });
+            });
+
+            if(window.self !== window.top){
+															window.parent.$('iframe.stepsFrame').height((this['scrollingElement']['scrollHeight']+20) +'px');
+							            }
+          });
+        </script>
+        <link href="css/steps.css" rel="stylesheet" type="text/css" />
+      </head>
+      <body>
+        <div id="gridContainer">
+          <div class="topMargin"></div>
+          <div id="listName" class="topMargin">
+            <h1>Host Your Own GitHub Alternative with Gitea on Windows</h1>
+          </div>
+          <div></div>
+          <div id="content">
+          <h2>What is Gitea?</h2>
+
+<blockquote><em>Gitea is a painless self-hosted Git service. It is similar to GitHub, Bitbucket, and GitLab. Gitea is a fork of Gogs. -<a href="https://docs.gitea.io/en-us/" target="_blank">https://docs.gitea.io/en-us/</a></em></blockquote>
+
+<h2>Installing Gitea</h2>
+
+<ol>
+	<li>Open a browser and navigate to https://dl.gitea.io/gitea</li>
+	<li>Open the folder for the latest release</li>
+	<li>Download the latest windows .exe release</li>
+	<li>Download Git for Windows <a href="https://github.com/git-for-windows/git/releases/latest" target="_blank">Download</a></li>
+	<li>Install Git for Windows</li>
+	<li>Rename the downloaded gitea .exe file gitea.exe</li>
+	<li>Copy/cut gitea.exe</li>
+	<li>Navigate to C:\Program Files and create a new folder called gitea</li>
+	<li>Paste gitea.exe inside the new gitea folder</li>
+	<li>Hold SHIFT and right click in the white space &gt; Open PowerShell window here...</li>
+	<li>Run the following commands in the PowerShell window
+	<div class="codeBlock PS"># create subdirectories<br />
+	$(New-Item -Force -Type Directory &#39;.\data&#39;)<br />
+	$(New-Item -Force -Type Directory &#39;.\log&#39;)<br />
+	# create basic ini configuration<br />
+	&quot;RUN_USER = $ENV:ComputerName`$`r`nAPP_NAME = Git`r`nRUN_MODE = prod`r`n`r`n[ui]`r`nDEFAULT_THEME = arc-green&quot; | Out-File -Encoding utf8 -FilePath &quot;$(New-Item -Force -Type Directory &#39;C:\Program Files\gitea\custom\conf&#39;)\app.ini&quot;<br />
+	# run gitea as a service<br />
+	New-Service -Name &quot;Gitea&quot; -BinaryPathName &#39;&quot;C:\Program Files\gitea\gitea.exe&quot; web --config &quot;C:\Program Files\gitea\custom\conf\app.ini&quot;&#39; -StartupType &quot;Automatic&quot; -Description &quot;Gitea&quot;<br />
+	# start the gitea service<br />
+	Start-Service &quot;Gitea&quot;</div>
+	</li>
+</ol>
+
+<h2>Initial Configuration</h2>
+
+<ol>
+	<li>Open a web browser and navigate to http://DNSorIP:3000</li>
+	<li>Set the database type to SQLite3 on the Initial Configuration screen &gt; Click the Install Gitea button</li>
+	<li>Click the Register Now link</li>
+	<li>Enter a username, email and password &gt; Click the Register Account button</li>
+	<li>Welcome to Gitea</li>
+</ol>
+
+<p>Documentation: <a href="https://docs.gitea.io/en-us/windows-service/" target="_blank">https://docs.gitea.io/en-us/windows-service/</a></p>
+          </div>
+        </div>
+      </body>
+    </html>
+