<ruby id="bdb3f"></ruby>

    <p id="bdb3f"><cite id="bdb3f"></cite></p>

      <p id="bdb3f"><cite id="bdb3f"><th id="bdb3f"></th></cite></p><p id="bdb3f"></p>
        <p id="bdb3f"><cite id="bdb3f"></cite></p>

          <pre id="bdb3f"></pre>
          <pre id="bdb3f"><del id="bdb3f"><thead id="bdb3f"></thead></del></pre>

          <ruby id="bdb3f"><mark id="bdb3f"></mark></ruby><ruby id="bdb3f"></ruby>
          <pre id="bdb3f"><pre id="bdb3f"><mark id="bdb3f"></mark></pre></pre><output id="bdb3f"></output><p id="bdb3f"></p><p id="bdb3f"></p>

          <pre id="bdb3f"><del id="bdb3f"><progress id="bdb3f"></progress></del></pre>

                <ruby id="bdb3f"></ruby>

                合規國際互聯網加速 OSASE為企業客戶提供高速穩定SD-WAN國際加速解決方案。 廣告
                ## 概述 Gitea 是一個輕量級的 DevOps 平臺軟件。從開發計劃到產品成型的整個軟件生命周期,他都能夠高效而輕松的幫助團隊和開發者。包括 Git 托管、代碼審查、團隊協作、軟件包注冊和 CI/CD。它與 GitHub、Bitbucket 和 GitLab 等比較類似。 Gitea 最初是從[Gogs](http://gogs.io/)分支而來,幾乎所有代碼都已更改 Gitea是一個基于Go語言開發的開源自助Git服務,它是Gogs的一個分支(或者說是一個社區驅動的Fork)。Gogs是一款輕量級的自助Git服務,最初由Unknwon開發,于2014年5月發布首個版本。然而,由于Gogs項目的一些社區成員對項目的發展方向和功能有不同的看法,并希望推動一些新的特性和改進,因此一些社區成員選擇從Gogs分叉出一個新的項目,這就是Gitea。 ## 目標 Gitea的首要目標是創建一個極易安裝,運行非常快速,安裝和使用體驗良好 的自建 Git 服務。 采用Go作為后端語言,只需生成一個可執行程序即可。 支持 Linux, macOS 和 Windows等多平臺, 支持主流的x86,amd64、 ARM 和 PowerPC等架構。 ## 功能特性 * 代碼托管:Gitea?持創建和管理倉庫、瀏覽提交歷史和代碼?件、審查和合并代碼提交、管理協作者、管理分?等。它還?持許多常見的Git特性,?如標簽、Cherry-pick、hook、集成協作?具等。 * 輕量級和快速: Gitea 的設計目標之一就是輕量級和快速響應。它不像一些大型的代碼托管平臺那樣臃腫,因此在性能方面表現出色,適用于資源有限的服務器環境。由于其輕量級設計,Gitea 在資源消耗方面相對較低,可以在資源有限的環境下運行良好。 * 易于部署和維護: 輕松地部署在各種服務器上,不需要復雜的配置和依賴。這使得個人開發者或小團隊可以方便地設置和管理自己的 Git 服務。 * 安全性: Gitea 注重安全性,提供了用戶權限管理、訪問控制列表等功能,可以確保代碼和數據的安全性。 * 代碼評審:代碼評審同時支持 Pull Request workflow 和 AGit workflow。評審?可以在線瀏覽代碼,并提交評審意見或問題。 提交者可以接收到評審意見,并在線回 復或修改代碼。代碼評審可以幫助用戶和企業提?代碼質量。 * CI/CD: Gitea Actions?持 CI/CD 功能,該功能兼容 GitHub Actions,??可以采用熟悉的YAML格式編寫workflows,也可以重??量的已有的 Actions 插件。Actions 插件支持從任意的 Git 網站中下載。 * 項目管理:Gitea 通過看板和?單來跟蹤?個項?的需求,功能和bug。?單?持分支,標簽、?程碑、 指派、時間跟蹤、到期時間、依賴關系等功能。 * 制品庫: Gitea支持超過 20 種不同種類的公有或私有軟件包管理,包括:Cargo, Chef, Composer, Conan, Conda, Container, Helm, Maven, npm, NuGet, Pub, PyPI, RubyGems, Vagrant等 * 開源社區支持: Gitea 是一個基于 MIT 許可證的開源項目,Gitea 擁有一個活躍的開源社區,能夠持續地進行開發和改進,同時也積極接受社區貢獻,保持了平臺的更新和創新。 * 多語言支持: Gitea 提供多種語言界面,適應全球范圍內的用戶,促進了國際化和本地化。 ## 其他版本控制系統的比較 Gitea、GitLab 和 GitHub 都是流行的版本控制系統,它們在某些方面有所不同。 #### 1. 功能特點: Gitea:輕量級的 Git 服務,提供基本的代碼托管、問題跟蹤、團隊協作等功能,適合個人開發者和小團隊使用。 GitLab:功能豐富的全面開源平臺,提供了包括代碼托管、CI/CD、問題跟蹤、Wiki 等在內的一系列功能,適合中小型企業和大型團隊使用。 GitHub:全球最大的代碼托管平臺,提供了強大的社交功能和廣泛的集成,是開源社區、個人開發者和企業最受歡迎的版本控制系統之一。 #### 2. 部署方式: Gitea:輕量級、易于部署,可以在個人服務器上快速搭建。 GitLab:功能豐富,部署和配置相對復雜,適合需要定制化和擴展性的場景。 GitHub:作為托管服務,無需用戶自行部署,但提供了企業版 GitHub Enterprise,可以在私有環境中部署。 #### 3. 擴展性: Gitea:作為輕量級的 Git 服務,擴展性較有限,但支持豐富的插件和自定義配置。 GitLab:提供了豐富的集成和擴展功能,可以滿足不同規模和需求的團隊。 GitHub:提供了大量的集成和第三方應用,但定制化程度相對較低。 #### 4. 社區支持: Gitea:作為一個相對較新的項目,社區規模相對較小,但活躍度不斷增加。 GitLab:擁有龐大的社區支持和活躍的開發者社區,提供了豐富的文檔和支持資源。 GitHub:擁有龐大的開發者社區和全球范圍的用戶基礎,是開源社區的首選平臺之一。 #### 5. 商業化支持: Gitea:目前主要由社區貢獻者維護,沒有官方的商業支持。 GitLab:提供了企業版和托管服務 GitLab.com,以及專業的技術支持和咨詢服務。 GitHub:作為微軟旗下的產品,提供了企業版 GitHub Enterprise 和 GitHub Actions 等商業化服務。 ![](https://img.kancloud.cn/46/74/4674475fb6df04221e7fc5204ca1845c_877x727.png) ## 安裝 這里使用二進制文件安裝。所有打包的二進制程序均包含 SQLite,MySQL 和 PostgreSQL 的數據庫連接支持,同時網站的靜態資源均已嵌入到可執行程序中,這一點和曾經的 Gogs 有所不同。 #### 使用wget 下載 使用以下命令下載適用于 64-bit Linux 平臺的二進制文件。 ``` wget -O gitea https://dl.gitea.com/gitea/1.21.1/gitea-1.21.1-linux-amd64 chmod +x gitea ``` #### 服務器設置 創建工作路徑并賦予權限 ``` sudo mkdir -p /var/lib/gitea/{custom,data,log} sudo chown -R www:www /var/lib/gitea/ sudo chmod -R 750 /var/lib/gitea/ ``` 創建配置路徑并賦予權限 ``` sudo mkdir /etc/gitea sudo chown root:www /etc/gitea sudo chmod 770 /etc/gitea ``` 配置 Gitea 工作路徑 > **提示:** 如果使用 Systemd 管理 Gitea 的 Linux 服務,你可以采用`WorkingDirectory`參數來配置工作路徑。 否則,使用環境變量`GITEA_WORK_DIR`來明確指出程序工作和數據存放路徑。 ``` export GITEA_WORK_DIR=/var/lib/gitea/ ``` 復制二進制文件到全局位置 ``` cp gitea /usr/local/bin/gitea ``` 運行 Gitea ``` GITEA_WORK_DIR=/var/lib/gitea/ /usr/local/bin/gitea web -c /etc/gitea/app.ini ``` #### 以 service 方式運行 新建`gitea.service` 服務文件。 ``` sudo vim /etc/systemd/system/gitea.service ``` 示例代碼 `gitea.service` ``` [Unit] Description=Gitea (Git with a cup of tea) After=network.target ### # Don't forget to add the database service dependencies ### # #Wants=mysql.service #After=mysql.service # #Wants=mariadb.service #After=mariadb.service # #Wants=postgresql.service #After=postgresql.service # #Wants=memcached.service #After=memcached.service # #Wants=redis.service #After=redis.service # ### # If using socket activation for main http/s ### # #After=gitea.main.socket #Requires=gitea.main.socket # ### # (You can also provide gitea an http fallback and/or ssh socket too) # # An example of /etc/systemd/system/gitea.main.socket ### ## ## [Unit] ## Description=Gitea Web Socket ## PartOf=gitea.service ## ## [Socket] ## Service=gitea.service ## ListenStream=<some_port> ## NoDelay=true ## ## [Install] ## WantedBy=sockets.target ## ### [Service] # Uncomment the next line if you have repos with lots of files and get a HTTP 500 error because of that # LimitNOFILE=524288:524288 RestartSec=2s Type=simple User=git Group=git WorkingDirectory=/var/lib/gitea/ # If using Unix socket: tells systemd to create the /run/gitea folder, which will contain the gitea.sock file # (manually creating /run/gitea doesn't work, because it would not persist across reboots) #RuntimeDirectory=gitea ExecStart=/usr/local/bin/gitea web --config /etc/gitea/app.ini Restart=always Environment=USER=git HOME=/home/git GITEA_WORK_DIR=/var/lib/gitea # If you install Git to directory prefix other than default PATH (which happens # for example if you install other versions of Git side-to-side with # distribution version), uncomment below line and add that prefix to PATH # Don't forget to place git-lfs binary on the PATH below if you want to enable # Git LFS support #Environment=PATH=/path/to/git/bin:/bin:/sbin:/usr/bin:/usr/sbin # If you want to bind Gitea to a port below 1024, uncomment # the two values below, or use socket activation to pass Gitea its ports as above ### #CapabilityBoundingSet=CAP_NET_BIND_SERVICE #AmbientCapabilities=CAP_NET_BIND_SERVICE ### # In some cases, when using CapabilityBoundingSet and AmbientCapabilities option, you may want to # set the following value to false to allow capabilities to be applied on gitea process. The following # value if set to true sandboxes gitea service and prevent any processes from running with privileges # in the host user namespace. ### #PrivateUsers=false ### [Install] WantedBy=multi-user.target ``` 修改`user`,`home`目錄以及其他必須的初始化參數,如果使用自定義端口,則需修改 PORT 參數,反之如果使用默認端口則需刪除 -p 標記。 激活 gitea 并將它作為系統自啟動服務 ``` sudo systemctl enable gitea sudo systemctl start gitea ``` 查看服務狀態 ``` sudo systemctl status gitea.service ``` ![](https://img.kancloud.cn/27/93/2793f1dc91e836308a378089147f27ac_1143x424.png) ## 使用 服務啟動沒問題,就可以通過公網`IP+3000`端口訪問了 ![](https://img.kancloud.cn/d2/a2/d2a255227113ceb8e69799f6def68937_1153x649.png) #### Nginx配置 ``` server { listen 80 ; server_name git.tinywan.com; location / { proxy_pass http://localhost:3000; proxy_set_header Host $host; proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_set_header X-Forwarded-Proto $scheme; } } ``` 通過配置域名訪問 ![](https://img.kancloud.cn/ff/f8/fff8a7e4420663572fd331051fc56580_1416x1017.png) 創建倉庫 ![](https://img.kancloud.cn/3f/77/3f777dd6451270f5e267713124d1a9c6_991x956.png) ``` PS D:\frontend\webman.tinywan.com> git push Enumerating objects: 3, done. Counting objects: 100% (3/3), done. Writing objects: 100% (3/3), 214 bytes | 53.00 KiB/s, done. Total 3 (delta 0), reused 0 (delta 0), pack-reused 0 remote: . Processing 1 references remote: Processed 1 references in total To http://git.tinywan.com:3000/resty/webman.tinywan.com.git * [new branch] main -> main ``` ![](https://img.kancloud.cn/df/b5/dfb517c08eac251f0f344eaa09998e86_1051x753.png)
                  <ruby id="bdb3f"></ruby>

                  <p id="bdb3f"><cite id="bdb3f"></cite></p>

                    <p id="bdb3f"><cite id="bdb3f"><th id="bdb3f"></th></cite></p><p id="bdb3f"></p>
                      <p id="bdb3f"><cite id="bdb3f"></cite></p>

                        <pre id="bdb3f"></pre>
                        <pre id="bdb3f"><del id="bdb3f"><thead id="bdb3f"></thead></del></pre>

                        <ruby id="bdb3f"><mark id="bdb3f"></mark></ruby><ruby id="bdb3f"></ruby>
                        <pre id="bdb3f"><pre id="bdb3f"><mark id="bdb3f"></mark></pre></pre><output id="bdb3f"></output><p id="bdb3f"></p><p id="bdb3f"></p>

                        <pre id="bdb3f"><del id="bdb3f"><progress id="bdb3f"></progress></del></pre>

                              <ruby id="bdb3f"></ruby>

                              哎呀哎呀视频在线观看