{"id":72589,"date":"2026-02-06T06:48:48","date_gmt":"2026-02-05T22:48:48","guid":{"rendered":"https:\/\/www.wsisp.com\/helps\/72589.html"},"modified":"2026-02-06T06:48:48","modified_gmt":"2026-02-05T22:48:48","slug":"%e9%98%bf%e9%87%8c%e4%ba%91-windows-%e6%9c%8d%e5%8a%a1%e5%99%a8-%e6%90%ad%e5%bb%ba-gitea-%e7%a7%81%e6%9c%89-git-%e6%9c%8d%e5%8a%a1%e5%99%a8%e5%ae%8c%e6%95%b4%e6%95%99%e7%a8%8b","status":"publish","type":"post","link":"https:\/\/www.wsisp.com\/helps\/72589.html","title":{"rendered":"\u963f\u91cc\u4e91 Windows \u670d\u52a1\u5668 \u642d\u5efa Gitea \u79c1\u6709 Git \u670d\u52a1\u5668\u5b8c\u6574\u6559\u7a0b"},"content":{"rendered":"<h2>Windows \u7cfb\u7edf\u642d\u5efa Gitea \u79c1\u6709 Git \u670d\u52a1\u5668\u5b8c\u6574\u6559\u7a0b<\/h2>\n<p>\u672c\u6587\u8be6\u7ec6\u4ecb\u7ecd\u5982\u4f55\u5728 Windows \u7cfb\u7edf\u4e0a\u642d\u5efa Gitea \u79c1\u6709 Git \u670d\u52a1\u5668&#xff0c;\u5305\u542b\u5b8c\u6574\u7684\u73af\u5883\u914d\u7f6e\u3001\u5b89\u88c5\u6b65\u9aa4\u3001\u5e38\u89c1\u95ee\u9898\u89e3\u51b3\u65b9\u6848&#xff0c;\u9002\u5408\u4e2a\u4eba\u5f00\u53d1\u8005\u548c\u5c0f\u56e2\u961f\u4f7f\u7528\u3002<\/p>\n<h3>&#x1f4dd; \u524d\u8a00<\/h3>\n<p>\u5728\u65e5\u5e38\u5f00\u53d1\u4e2d&#xff0c;\u642d\u5efa\u79c1\u6709 Git \u670d\u52a1\u5668\u662f\u8bb8\u591a\u5f00\u53d1\u8005\u548c\u56e2\u961f\u7684\u9700\u6c42\u3002\u76f8\u6bd4\u4e8e GitLab \u7684\u590d\u6742\u914d\u7f6e&#xff0c;Gitea \u662f\u4e00\u4e2a\u8f7b\u91cf\u7ea7\u7684 Git \u670d\u52a1\u89e3\u51b3\u65b9\u6848\u3002\u672c\u6587\u5c06\u8be6\u7ec6\u4ecb\u7ecd\u5728\u963f\u91cc\u4e91 Windows \u670d\u52a1\u5668\u4e0a\u642d\u5efa Gitea \u670d\u52a1\u5668\u7684\u5b8c\u6574\u8fc7\u7a0b&#xff0c;\u5e76\u91cd\u70b9\u89e3\u51b3 Windows \u5e73\u53f0\u548c\u4e91\u670d\u52a1\u5668\u73af\u5883\u7684\u7279\u6709\u6311\u6218\u3002<\/p>\n<p>\u90e8\u7f72\u73af\u5883\u8bf4\u660e&#xff1a;\u672c\u6559\u7a0b\u57fa\u4e8e\u963f\u91cc\u4e91 Windows Server \u5b9e\u4f8b\u7684\u771f\u5b9e\u90e8\u7f72\u7ecf\u9a8c&#xff0c;\u6f14\u793a\u670d\u52a1\u5668\u4f7f\u7528\u793a\u4f8bIP 192.168.1.100&#xff08;\u8bf7\u66ff\u6362\u4e3a\u60a8\u7684\u5b9e\u9645\u516c\u7f51IP&#xff09;&#xff0c;\u652f\u6301\u8de8\u5e73\u53f0\u5ba2\u6237\u7aef&#xff08;Windows PC \u548c Mac&#xff09;\u7684\u8fdc\u7a0b\u8bbf\u95ee\u3002<\/p>\n<h4>\u4e3a\u4ec0\u4e48\u9009\u62e9 Gitea&#xff1f;<\/h4>\n<ul>\n<li>&#x1f680; \u8f7b\u91cf\u7ea7&#xff1a;\u8d44\u6e90\u5360\u7528\u5c11&#xff0c;\u542f\u52a8\u901f\u5ea6\u5feb<\/li>\n<li>&#x1f527; \u6613\u90e8\u7f72&#xff1a;\u5355\u4e00\u53ef\u6267\u884c\u6587\u4ef6&#xff0c;\u65e0\u590d\u6742\u4f9d\u8d56<\/li>\n<li>&#x1f310; \u529f\u80fd\u5b8c\u6574&#xff1a;\u652f\u6301 Issues\u3001Pull Requests\u3001Wiki \u7b49<\/li>\n<li>&#x1f4be; \u591a\u6570\u636e\u5e93\u652f\u6301&#xff1a;SQLite\u3001MySQL\u3001PostgreSQL<\/li>\n<li>&#x1f512; \u79c1\u6709\u53ef\u63a7&#xff1a;\u672c\u5730\u90e8\u7f72&#xff0c;\u6570\u636e\u5b8c\u5168\u638c\u63a7<\/li>\n<\/ul>\n<h4>\u963f\u91cc\u4e91 Windows \u670d\u52a1\u5668\u7684\u4f18\u52bf<\/h4>\n<p>\u9009\u62e9\u963f\u91cc\u4e91 Windows Server \u4f5c\u4e3a Gitea \u90e8\u7f72\u5e73\u53f0\u5177\u6709\u4ee5\u4e0b\u4f18\u52bf&#xff1a;<\/p>\n<h5>&#x1f4bb; Windows Server \u7279\u8272<\/h5>\n<ul>\n<li>\u56fe\u5f62\u5316\u7ba1\u7406&#xff1a;\u8fdc\u7a0b\u684c\u9762\u4fbf\u4e8e\u7ef4\u62a4\u548c\u6545\u969c\u6392\u67e5<\/li>\n<li>AD \u96c6\u6210&#xff1a;\u4f01\u4e1a\u73af\u5883\u4e0b\u4e0e Active Directory \u65e0\u7f1d\u96c6\u6210<\/li>\n<li>\u5f00\u53d1\u53cb\u597d&#xff1a;\u652f\u6301 .NET\u3001PowerShell \u7b49 Windows \u6280\u672f\u6808<\/li>\n<li>\u8bb8\u53ef\u5408\u89c4&#xff1a;\u4f01\u4e1a\u7ea7 Windows Server \u6388\u6743<\/li>\n<\/ul>\n<h5>&#x1f512; \u7f51\u7edc\u548c\u5b89\u5168\u914d\u7f6e<\/h5>\n<ul>\n<li>\u5f39\u6027\u516c\u7f51IP&#xff1a;\u56fa\u5b9a\u5916\u7f51\u5730\u5740&#xff0c;\u652f\u6301\u57df\u540d\u7ed1\u5b9a<\/li>\n<li>\u5b89\u5168\u7ec4\u89c4\u5219&#xff1a;\u7cbe\u786e\u63a7\u5236\u7aef\u53e3\u548c\u8bbf\u95ee\u6765\u6e90<\/li>\n<li>VPC \u7f51\u7edc&#xff1a;\u5185\u7f51\u9694\u79bb&#xff0c;\u63d0\u5347\u5b89\u5168\u6027<\/li>\n<li>SSL \u8bc1\u4e66&#xff1a;\u652f\u6301 HTTPS \u52a0\u5bc6\u4f20\u8f93<\/li>\n<\/ul>\n<h5>&#x1f527; \u73af\u5883\u590d\u6742\u6027<\/h5>\n<ul>\n<li>PATH \u73af\u5883\u53d8\u91cf&#xff1a;Windows \u7684 PATH \u7ba1\u7406\u6bd4\u8f83\u590d\u6742&#xff0c;\u9700\u8981\u6b63\u786e\u914d\u7f6e<\/li>\n<li>\u6743\u9650\u6a21\u578b&#xff1a;UAC \u548c\u6587\u4ef6\u6743\u9650\u7cfb\u7edf\u4e0e Unix \u7cfb\u7edf\u5dee\u5f02\u8f83\u5927<\/li>\n<li>\u670d\u52a1\u7ba1\u7406&#xff1a;Windows \u670d\u52a1\u6ce8\u518c\u548c\u7ba1\u7406\u673a\u5236\u72ec\u7279<\/li>\n<li>\u7aef\u53e3\u51b2\u7a81&#xff1a;IIS \u7b49\u7cfb\u7edf\u670d\u52a1\u53ef\u80fd\u5360\u7528\u5e38\u7528\u7aef\u53e3<\/li>\n<\/ul>\n<h5>&#x1f4bb; \u5f00\u53d1\u5de5\u5177\u96c6\u6210<\/h5>\n<ul>\n<li>PowerShell vs CMD&#xff1a;\u4e0d\u540c\u547d\u4ee4\u884c\u73af\u5883\u7684\u517c\u5bb9\u6027\u5904\u7406<\/li>\n<li>Git \u5b89\u88c5&#xff1a;\u9700\u8981\u5355\u72ec\u5b89\u88c5 Git \u5ba2\u6237\u7aef\u5de5\u5177<\/li>\n<li>\u7f16\u7801\u73af\u5883&#xff1a;\u4e0e\u73b0\u4ee3\u5f00\u53d1\u5de5\u5177\u5982 Windsurf\u3001VS Code \u7684\u96c6\u6210<\/li>\n<\/ul>\n<h5>&#x1f3e2; \u4f01\u4e1a\u73af\u5883\u9002\u914d<\/h5>\n<ul>\n<li>\u9632\u706b\u5899\u914d\u7f6e&#xff1a;Windows Defender \u548c\u4f01\u4e1a\u9632\u706b\u5899\u8bbe\u7f6e<\/li>\n<li>\u7f51\u7edc\u73af\u5883&#xff1a;\u4f01\u4e1a\u7f51\u7edc\u4ee3\u7406\u548c\u8bbf\u95ee\u63a7\u5236<\/li>\n<li>\u5b89\u5168\u7b56\u7565&#xff1a;\u7ec4\u7b56\u7565\u548c\u5b89\u5168\u9650\u5236\u7684\u5904\u7406<\/li>\n<\/ul>\n<h3>&#x1f6e0;\ufe0f \u73af\u5883\u51c6\u5907\u4e0e\u9884\u68c0\u67e5<\/h3>\n<h4>\u7cfb\u7edf\u8981\u6c42<\/h4>\n<ul>\n<li>\u963f\u91cc\u4e91 ECS \u5b9e\u4f8b&#xff1a;Windows Server 2019\/2022&#xff08;\u63a8\u8350&#xff09;<\/li>\n<li>\u5b9e\u4f8b\u89c4\u683c&#xff1a;\u81f3\u5c11 2\u68384GB&#xff08;ecs.t5-lc1m2.large \u6216\u4ee5\u4e0a&#xff09;<\/li>\n<li>\u7f51\u7edc\u914d\u7f6e&#xff1a;\u5206\u914d\u5f39\u6027\u516c\u7f51IP&#xff0c;\u914d\u7f6e\u5b89\u5168\u7ec4<\/li>\n<li>\u5b58\u50a8\u7a7a\u95f4&#xff1a;\u7cfb\u7edf\u76d8 40GB &#043; \u6570\u636e\u76d8 100GB&#xff08;\u63a8\u8350&#xff09;<\/li>\n<li>\u7ba1\u7406\u5458\u6743\u9650&#xff1a;\u8fdc\u7a0b\u684c\u9762\u7ba1\u7406\u5458\u8d26\u6237<\/li>\n<\/ul>\n<h4>\u963f\u91cc\u4e91\u670d\u52a1\u5668\u9884\u914d\u7f6e\u68c0\u67e5<\/h4>\n<p><span class=\"token comment\"># 1. \u68c0\u67e5\u670d\u52a1\u5668\u57fa\u672c\u4fe1\u606f<\/span><br \/>\n<span class=\"token function\">Get-ComputerInfo<\/span> <span class=\"token punctuation\">|<\/span> <span class=\"token function\">Select-Object<\/span> WindowsProductName<span class=\"token punctuation\">,<\/span> TotalPhysicalMemory<br \/>\n<span class=\"token function\">Get-WmiObject<\/span> <span class=\"token operator\">&#8211;<\/span><span class=\"token keyword\">Class<\/span> Win32_LogicalDisk <span class=\"token punctuation\">|<\/span> <span class=\"token function\">Select-Object<\/span> DeviceID<span class=\"token punctuation\">,<\/span> Size<span class=\"token punctuation\">,<\/span> FreeSpace<\/p>\n<p><span class=\"token comment\"># 2. \u68c0\u67e5\u7f51\u7edc\u914d\u7f6e<\/span><br \/>\nipconfig <span class=\"token operator\">\/<\/span>all<br \/>\n<span class=\"token comment\"># \u8bb0\u5f55\u5185\u7f51IP\u548c\u516c\u7f51IP\u4fe1\u606f<\/span><\/p>\n<p><span class=\"token comment\"># 3. \u68c0\u67e5\u5b89\u5168\u7ec4\u914d\u7f6e<\/span><br \/>\n<span class=\"token comment\"># \u5728\u963f\u91cc\u4e91\u63a7\u5236\u53f0\u786e\u8ba4\u4ee5\u4e0b\u7aef\u53e3\u5df2\u5f00\u653e&#xff1a;<\/span><br \/>\n<span class=\"token comment\"># &#8211; 3389 (RDP\u8fdc\u7a0b\u684c\u9762)<\/span><br \/>\n<span class=\"token comment\"># &#8211; 3000 (Gitea HTTP\u670d\u52a1)  <\/span><br \/>\n<span class=\"token comment\"># &#8211; 22 (SSH&#xff0c;\u53ef\u9009)<\/span><br \/>\n<span class=\"token comment\"># &#8211; 443 (HTTPS&#xff0c;\u53ef\u9009)<\/span><\/p>\n<p><span class=\"token comment\"># 4. \u68c0\u67e5\u9632\u706b\u5899\u72b6\u6001<\/span><br \/>\n<span class=\"token function\">Get-NetFirewallProfile<\/span><br \/>\nnetsh advfirewall show allprofiles state<\/p>\n<p><span class=\"token comment\"># 1. \u68c0\u67e5 Windows \u7248\u672c\u548c\u67b6\u6784<\/span><br \/>\n<span class=\"token function\">Get-ComputerInfo<\/span> <span class=\"token punctuation\">|<\/span> <span class=\"token function\">Select-Object<\/span> WindowsProductName<span class=\"token punctuation\">,<\/span> WindowsVersion<br \/>\n<span class=\"token namespace\">[Environment]<\/span>::Is64BitOperatingSystem<\/p>\n<p><span class=\"token comment\"># 2. \u68c0\u67e5\u7ba1\u7406\u5458\u6743\u9650<\/span><br \/>\n<span class=\"token punctuation\">(<\/span><span class=\"token namespace\">[Security.Principal.WindowsPrincipal]<\/span> <span class=\"token namespace\">[Security.Principal.WindowsIdentity]<\/span>::GetCurrent<span class=\"token punctuation\">(<\/span><span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">.<\/span>IsInRole<span class=\"token punctuation\">(<\/span><span class=\"token namespace\">[Security.Principal.WindowsBuiltInRole]<\/span>::Administrator<span class=\"token punctuation\">)<\/span><\/p>\n<p><span class=\"token comment\"># 3. \u68c0\u67e5 PowerShell \u6267\u884c\u7b56\u7565<\/span><br \/>\n<span class=\"token function\">Get-ExecutionPolicy<\/span> <span class=\"token operator\">&#8211;<\/span>List<\/p>\n<p><span class=\"token comment\"># 4. \u68c0\u67e5\u7aef\u53e3\u53ef\u7528\u6027<\/span><br \/>\nnetstat <span class=\"token operator\">&#8211;<\/span>an <span class=\"token punctuation\">|<\/span> findstr :3000<br \/>\n<span class=\"token function\">Test-NetConnection<\/span> <span class=\"token operator\">&#8211;<\/span>ComputerName localhost <span class=\"token operator\">&#8211;<\/span>Port 3000<\/p>\n<p><span class=\"token comment\"># 5. \u68c0\u67e5\u78c1\u76d8\u7a7a\u95f4<\/span><br \/>\n<span class=\"token function\">Get-WmiObject<\/span> <span class=\"token operator\">&#8211;<\/span><span class=\"token keyword\">Class<\/span> Win32_LogicalDisk <span class=\"token punctuation\">|<\/span> <span class=\"token function\">Select-Object<\/span> DeviceID<span class=\"token punctuation\">,<\/span> FreeSpace<\/p>\n<p><span class=\"token comment\"># 6. \u68c0\u67e5\u7f51\u7edc\u8fde\u63a5<\/span><br \/>\n<span class=\"token function\">Test-NetConnection<\/span> <span class=\"token operator\">&#8211;<\/span>ComputerName google<span class=\"token punctuation\">.<\/span>com <span class=\"token operator\">&#8211;<\/span>Port 443<\/p>\n<h4>Git \u73af\u5883\u68c0\u67e5<\/h4>\n<p><span class=\"token comment\"># \u68c0\u67e5 Git \u662f\u5426\u5df2\u5b89\u88c5<\/span><br \/>\ngit <span class=\"token operator\">&#8212;<\/span>version<br \/>\nwhere git<\/p>\n<p><span class=\"token comment\"># \u5982\u679c\u672a\u5b89\u88c5&#xff0c;\u9700\u8981\u5148\u5b89\u88c5 Git<\/span><br \/>\n<span class=\"token comment\"># \u4e0b\u8f7d\u5730\u5740&#xff1a;https:\/\/git-scm.com\/download\/win<\/span><\/p>\n<h3>&#x1f4e6; \u65b9\u6cd5\u4e00&#xff1a;\u76f4\u63a5\u90e8\u7f72\u4e8c\u8fdb\u5236\u6587\u4ef6&#xff08;\u63a8\u8350&#xff09;<\/h3>\n<h4>1. \u4e0b\u8f7d Gitea \u4e8c\u8fdb\u5236\u6587\u4ef6<\/h4>\n<p><span class=\"token comment\"># \u521b\u5efa\u5de5\u4f5c\u76ee\u5f55<\/span><br \/>\n<span class=\"token function\">New-Item<\/span> <span class=\"token operator\">&#8211;<\/span>ItemType Directory <span class=\"token operator\">&#8211;<\/span>Path <span class=\"token string\">&#034;C:\\\\gitea&#034;<\/span> <span class=\"token operator\">&#8211;<\/span>Force<br \/>\n<span class=\"token function\">Set-Location<\/span> <span class=\"token string\">&#034;C:\\\\gitea&#034;<\/span><\/p>\n<p><span class=\"token comment\"># \u4e0b\u8f7d\u6700\u65b0\u7248\u672c\u7684 Gitea&#xff08;Windows 64\u4f4d&#xff09;<\/span><br \/>\n<span class=\"token comment\"># \u8bbf\u95ee https:\/\/dl.gitea.io\/gitea\/ \u83b7\u53d6\u6700\u65b0\u7248\u672c<\/span><br \/>\n<span class=\"token variable\">$giteaVersion<\/span> &#061; <span class=\"token string\">&#034;1.21.11&#034;<\/span><br \/>\n<span class=\"token variable\">$downloadUrl<\/span> &#061; <span class=\"token string\">&#034;https:\/\/dl.gitea.io\/gitea\/<span class=\"token variable\">$giteaVersion<\/span>\/gitea-<span class=\"token variable\">$giteaVersion<\/span>-windows-4.0-amd64.exe&#034;<\/span><br \/>\n<span class=\"token function\">Invoke-WebRequest<\/span> <span class=\"token operator\">&#8211;<\/span>Uri <span class=\"token variable\">$downloadUrl<\/span> <span class=\"token operator\">&#8211;<\/span>OutFile <span class=\"token string\">&#034;gitea.exe&#034;<\/span><\/p>\n<p><span class=\"token comment\"># \u9a8c\u8bc1\u4e0b\u8f7d<\/span><br \/>\n<span class=\"token punctuation\">.<\/span>\\\\gitea<span class=\"token punctuation\">.<\/span>exe <span class=\"token operator\">&#8212;<\/span>version<\/p>\n<h4>2. \u521b\u5efa\u76ee\u5f55\u7ed3\u6784<\/h4>\n<p><span class=\"token comment\"># \u521b\u5efa Gitea \u76ee\u5f55\u7ed3\u6784<\/span><br \/>\n<span class=\"token function\">New-Item<\/span> <span class=\"token operator\">&#8211;<\/span>ItemType Directory <span class=\"token operator\">&#8211;<\/span>Path <span class=\"token string\">&#034;C:\\\\gitea\\\\custom\\\\conf&#034;<\/span> <span class=\"token operator\">&#8211;<\/span>Force<br \/>\n<span class=\"token function\">New-Item<\/span> <span class=\"token operator\">&#8211;<\/span>ItemType Directory <span class=\"token operator\">&#8211;<\/span>Path <span class=\"token string\">&#034;C:\\\\gitea\\\\data\\\\repositories&#034;<\/span> <span class=\"token operator\">&#8211;<\/span>Force<br \/>\n<span class=\"token function\">New-Item<\/span> <span class=\"token operator\">&#8211;<\/span>ItemType Directory <span class=\"token operator\">&#8211;<\/span>Path <span class=\"token string\">&#034;C:\\\\gitea\\\\data\\\\lfs&#034;<\/span> <span class=\"token operator\">&#8211;<\/span>Force<br \/>\n<span class=\"token function\">New-Item<\/span> <span class=\"token operator\">&#8211;<\/span>ItemType Directory <span class=\"token operator\">&#8211;<\/span>Path <span class=\"token string\">&#034;C:\\\\gitea\\\\log&#034;<\/span> <span class=\"token operator\">&#8211;<\/span>Force<\/p>\n<p><span class=\"token comment\"># \u67e5\u770b\u521b\u5efa\u7684\u76ee\u5f55\u7ed3\u6784<\/span><br \/>\n<span class=\"token function\">Get-ChildItem<\/span> <span class=\"token operator\">&#8211;<\/span>Path <span class=\"token string\">&#034;C:\\\\gitea&#034;<\/span> <span class=\"token operator\">&#8211;<\/span>Recurse <span class=\"token punctuation\">|<\/span> <span class=\"token function\">Format-Table<\/span> Name<span class=\"token punctuation\">,<\/span> Mode<\/p>\n<h4>3. \u521d\u59cb\u5316\u914d\u7f6e<\/h4>\n<p><span class=\"token comment\"># \u8bbe\u7f6e\u73af\u5883\u53d8\u91cf&#xff08;\u786e\u4fdd Git \u53ef\u7528&#xff09;<\/span><br \/>\n<span class=\"token variable\">$env<\/span>:PATH <span class=\"token operator\">&#043;&#061;<\/span> <span class=\"token string\">&#034;;C:\\\\Program Files\\\\Git\\\\bin&#034;<\/span><br \/>\n<span class=\"token namespace\">[Environment]<\/span>::SetEnvironmentVariable<span class=\"token punctuation\">(<\/span><span class=\"token string\">&#034;PATH&#034;<\/span><span class=\"token punctuation\">,<\/span> <span class=\"token variable\">$env<\/span>:PATH <span class=\"token operator\">&#043;<\/span> <span class=\"token string\">&#034;;C:\\\\Program Files\\\\Git\\\\bin&#034;<\/span><span class=\"token punctuation\">,<\/span> <span class=\"token string\">&#034;Machine&#034;<\/span><span class=\"token punctuation\">)<\/span><\/p>\n<p><span class=\"token comment\"># \u9996\u6b21\u542f\u52a8 Gitea&#xff08;\u5c06\u81ea\u52a8\u8fdb\u5165\u5b89\u88c5\u5411\u5bfc&#xff09;<\/span><br \/>\n<span class=\"token function\">Set-Location<\/span> <span class=\"token string\">&#034;C:\\\\gitea&#034;<\/span><br \/>\n<span class=\"token punctuation\">.<\/span>\\\\gitea<span class=\"token punctuation\">.<\/span>exe web<\/p>\n<h4>4. Web \u754c\u9762\u914d\u7f6e<\/h4>\n<p>\u542f\u52a8\u540e&#xff0c;\u6253\u5f00\u6d4f\u89c8\u5668\u8bbf\u95ee http:\/\/localhost:3000 \u6216 http:\/\/\u670d\u52a1\u5668\u516c\u7f51IP:3000 \u8fdb\u884c\u914d\u7f6e&#xff1a;<\/p>\n<p>\u91cd\u8981&#xff1a;\u5982\u679c\u4f7f\u7528\u963f\u91cc\u4e91\u670d\u52a1\u5668&#xff0c;\u9700\u8981\u5728\u5b89\u5168\u7ec4\u4e2d\u5f00\u653e 3000 \u7aef\u53e3&#xff0c;\u5e76\u53ef\u4ee5\u901a\u8fc7\u516c\u7f51IP\u8bbf\u95ee\u3002<\/p>\n<h5>\u6570\u636e\u5e93\u8bbe\u7f6e<\/h5>\n<ul>\n<li>\u6570\u636e\u5e93\u7c7b\u578b&#xff1a;\u9009\u62e9 SQLite3&#xff08;\u63a8\u8350&#xff0c;\u9002\u5408\u4e2d\u5c0f\u89c4\u6a21\u4f7f\u7528&#xff09;<\/li>\n<li>\u6570\u636e\u5e93\u6587\u4ef6\u8def\u5f84&#xff1a;C:\\\\gitea\\\\data\\\\gitea.db<\/li>\n<\/ul>\n<h5>\u57fa\u672c\u8bbe\u7f6e<\/h5>\n<ul>\n<li>\u7ad9\u70b9\u540d\u79f0&#xff1a;\u81ea\u5b9a\u4e49&#xff0c;\u5982 \u201c\u56e2\u961f\u4ee3\u7801\u4ed3\u5e93\u201d<\/li>\n<li>\u4ed3\u5e93\u6839\u76ee\u5f55&#xff1a;C:\\\\gitea\\\\data\\\\repositories<\/li>\n<li>Git LFS \u6839\u76ee\u5f55&#xff1a;C:\\\\gitea\\\\data\\\\lfs<\/li>\n<li>\u8fd0\u884c\u7528\u6237&#xff1a;\u5f53\u524d Windows \u7528\u6237\u540d<\/li>\n<li>\u670d\u52a1\u5668\u57df\u540d&#xff1a;your-server-ip&#xff08;\u66ff\u6362\u4e3a\u60a8\u7684\u670d\u52a1\u5668\u516c\u7f51IP&#xff09;<\/li>\n<li>SSH \u7aef\u53e3&#xff1a;22&#xff08;\u5982\u679c\u542f\u7528 SSH&#xff09;<\/li>\n<li>HTTP \u7aef\u53e3&#xff1a;3000<\/li>\n<li>\u5e94\u7528\u7a0b\u5e8f URL&#xff1a;http:\/\/your-server-ip:3000\/&#xff08;\u66ff\u6362\u4e3a\u60a8\u7684\u516c\u7f51IP&#xff09;<\/li>\n<\/ul>\n<h5>\u7ba1\u7406\u5458\u8d26\u6237<\/h5>\n<ul>\n<li>\u7ba1\u7406\u5458\u7528\u6237\u540d&#xff1a;admin&#xff08;\u5efa\u8bae\u4fee\u6539\u4e3a\u81ea\u5b9a\u4e49\u7528\u6237\u540d&#xff09;<\/li>\n<li>\u5bc6\u7801&#xff1a;\u8bf7\u8bbe\u7f6e\u590d\u6742\u5bc6\u7801&#xff0c;\u5305\u542b\u5927\u5c0f\u5199\u5b57\u6bcd\u3001\u6570\u5b57\u548c\u7279\u6b8a\u5b57\u7b26<\/li>\n<li>\u786e\u8ba4\u5bc6\u7801&#xff1a;\u91cd\u590d\u8f93\u5165\u5bc6\u7801<\/li>\n<li>\u7ba1\u7406\u5458\u90ae\u7bb1&#xff1a;admin&#064;yourdomain.com&#xff08;\u4f7f\u7528\u60a8\u7684\u5b9e\u9645\u90ae\u7bb1&#xff09;<\/li>\n<\/ul>\n<p>\u5b8c\u6210\u914d\u7f6e\u540e\u70b9\u51fb&#034;\u7acb\u5373\u5b89\u88c5&#034;\u3002<\/p>\n<h3>&#x1f310; \u5916\u90e8\u78c1\u76d8\u5b58\u50a8\u914d\u7f6e&#xff08;\u53ef\u9009&#xff09;<\/h3>\n<p>\u5982\u679c\u9700\u8981\u5c06\u4ee3\u7801\u4ed3\u5e93\u5b58\u50a8\u5728\u5176\u4ed6\u78c1\u76d8&#xff0c;\u53ef\u4ee5\u8fdb\u884c\u4ee5\u4e0b\u914d\u7f6e&#xff1a;<\/p>\n<h4>1. \u521b\u5efa\u5916\u90e8\u5b58\u50a8\u7ed3\u6784<\/h4>\n<p><span class=\"token comment\"># \u5047\u8bbe\u4f7f\u7528 D \u76d8\u5b58\u50a8<\/span><br \/>\n<span class=\"token function\">New-Item<\/span> <span class=\"token operator\">&#8211;<\/span>ItemType Directory <span class=\"token operator\">&#8211;<\/span>Path <span class=\"token string\">&#034;D:\\\\GitRepositories&#034;<\/span> <span class=\"token operator\">&#8211;<\/span>Force<br \/>\n<span class=\"token function\">New-Item<\/span> <span class=\"token operator\">&#8211;<\/span>ItemType Directory <span class=\"token operator\">&#8211;<\/span>Path <span class=\"token string\">&#034;D:\\\\GitLFS&#034;<\/span> <span class=\"token operator\">&#8211;<\/span>Force<\/p>\n<p><span class=\"token comment\"># \u8bbe\u7f6e\u5408\u9002\u7684\u6743\u9650<\/span><br \/>\nicacls <span class=\"token string\">&#034;D:\\\\GitRepositories&#034;<\/span> <span class=\"token operator\">\/<\/span>grant <span class=\"token string\">&#034;<span class=\"token function\">$<span class=\"token punctuation\">(<\/span><span class=\"token variable\">$env<\/span>:USERNAME<span class=\"token punctuation\">)<\/span><\/span>:F&#034;<\/span> <span class=\"token operator\">\/<\/span>T<br \/>\nicacls <span class=\"token string\">&#034;D:\\\\GitLFS&#034;<\/span> <span class=\"token operator\">\/<\/span>grant <span class=\"token string\">&#034;<span class=\"token function\">$<span class=\"token punctuation\">(<\/span><span class=\"token variable\">$env<\/span>:USERNAME<span class=\"token punctuation\">)<\/span><\/span>:F&#034;<\/span> <span class=\"token operator\">\/<\/span>T<\/p>\n<h4>2. \u4fee\u6539\u914d\u7f6e\u6587\u4ef6<\/h4>\n<p>\u7f16\u8f91 C:\\\\gitea\\\\custom\\\\conf\\\\app.ini&#xff1a;<\/p>\n<p>[repository]<br \/>\nROOT &#061; D:\/GitRepositories<\/p>\n<p>[lfs]<br \/>\nPATH &#061; D:\/GitLFS<\/p>\n<h3>&#x1f680; \u8bbe\u7f6e Windows \u670d\u52a1&#xff08;\u5f00\u673a\u81ea\u542f&#xff09;<\/h3>\n<h4>\u4f7f\u7528 NSSM \u521b\u5efa Windows \u670d\u52a1<\/h4>\n<p><span class=\"token comment\"># 1. \u4e0b\u8f7d NSSM (Non-Sucking Service Manager)<\/span><br \/>\n<span class=\"token comment\"># \u4e0b\u8f7d\u5730\u5740&#xff1a;https:\/\/nssm.cc\/download<\/span><br \/>\n<span class=\"token comment\"># \u89e3\u538b\u5230 C:\\\\nssm<\/span><\/p>\n<p><span class=\"token comment\"># 2. \u4f7f\u7528 NSSM \u521b\u5efa\u670d\u52a1<\/span><br \/>\nC:\\\\nssm\\\\win64\\\\nssm<span class=\"token punctuation\">.<\/span>exe install Gitea<\/p>\n<p><span class=\"token comment\"># \u5728\u5f39\u51fa\u7684\u754c\u9762\u4e2d\u8bbe\u7f6e&#xff1a;<\/span><br \/>\n<span class=\"token comment\"># Path: C:\\\\gitea\\\\gitea.exe<\/span><br \/>\n<span class=\"token comment\"># Startup directory: C:\\\\gitea<\/span><br \/>\n<span class=\"token comment\"># Arguments: web<\/span><\/p>\n<p><span class=\"token comment\"># 3. \u542f\u52a8\u670d\u52a1<\/span><br \/>\n<span class=\"token function\">Start-Service<\/span> Gitea<\/p>\n<p><span class=\"token comment\"># 4. \u8bbe\u7f6e\u670d\u52a1\u5f00\u673a\u81ea\u542f\u52a8<\/span><br \/>\n<span class=\"token function\">Set-Service<\/span> <span class=\"token operator\">&#8211;<\/span>Name Gitea <span class=\"token operator\">&#8211;<\/span>StartupType Automatic<\/p>\n<h3>&#x1f310; \u963f\u91cc\u4e91\u7f51\u7edc\u8bbf\u95ee\u914d\u7f6e<\/h3>\n<h4>\u5b89\u5168\u7ec4\u914d\u7f6e<\/h4>\n<p>\u5728\u963f\u91cc\u4e91 ECS \u63a7\u5236\u53f0\u914d\u7f6e\u5b89\u5168\u7ec4\u89c4\u5219&#xff1a;<\/p>\n<p><span class=\"token comment\"># \u5165\u65b9\u5411\u89c4\u5219\u914d\u7f6e<\/span><br \/>\n\u7aef\u53e3\u8303\u56f4: <span class=\"token number\">3000<\/span>\/3000<br \/>\n\u6388\u6743\u5bf9\u8c61: <span class=\"token number\">0.0<\/span>.0.0\/0 <span class=\"token punctuation\">(<\/span>\u6240\u6709IP&#xff0c;\u751f\u4ea7\u73af\u5883\u5efa\u8bae\u9650\u5236\u7279\u5b9aIP\u6bb5<span class=\"token punctuation\">)<\/span><br \/>\n\u534f\u8bae\u7c7b\u578b: TCP<br \/>\n\u4f18\u5148\u7ea7: <span class=\"token number\">1<\/span><\/p>\n<p><span class=\"token comment\"># \u53ef\u9009&#xff1a;HTTPS \u652f\u6301<\/span><br \/>\n\u7aef\u53e3\u8303\u56f4: <span class=\"token number\">443<\/span>\/443<br \/>\n\u6388\u6743\u5bf9\u8c61: <span class=\"token number\">0.0<\/span>.0.0\/0<br \/>\n\u534f\u8bae\u7c7b\u578b: TCP<\/p>\n<h4>\u5185\u5916\u7f51\u8bbf\u95ee\u914d\u7f6e<\/h4>\n<p>\u7f16\u8f91 C:\\\\gitea\\\\custom\\\\conf\\\\app.ini&#xff1a;<\/p>\n<p>[server]<br \/>\nDOMAIN &#061; your-server-ip  # \u66ff\u6362\u4e3a\u60a8\u7684\u5b9e\u9645\u670d\u52a1\u5668IP<br \/>\nROOT_URL &#061; http:\/\/your-server-ip:3000\/<br \/>\nHTTP_ADDR &#061; 0.0.0.0  # \u76d1\u542c\u6240\u6709\u7f51\u7edc\u63a5\u53e3<br \/>\nHTTP_PORT &#061; 3000<\/p>\n<p>[service]<br \/>\nDISABLE_REGISTRATION &#061; true  # \u5173\u95ed\u516c\u5f00\u6ce8\u518c&#xff08;\u91cd\u8981\u5b89\u5168\u8bbe\u7f6e&#xff09;<br \/>\nENABLE_CAPTCHA &#061; true<\/p>\n<h4>\u8de8\u5e73\u53f0\u5ba2\u6237\u7aef\u8bbf\u95ee<\/h4>\n<p>\u914d\u7f6e\u5b8c\u6210\u540e&#xff0c;\u4e0d\u540c\u5e73\u53f0\u7684\u5ba2\u6237\u7aef\u90fd\u53ef\u4ee5\u8bbf\u95ee&#xff1a;<\/p>\n<p><span class=\"token comment\"># Windows \u5ba2\u6237\u7aef<\/span><br \/>\n<span class=\"token function\">git<\/span> clone http:\/\/your-server-ip:3000\/username\/repository.git<\/p>\n<p><span class=\"token comment\"># Mac \u5ba2\u6237\u7aef  <\/span><br \/>\n<span class=\"token function\">git<\/span> clone http:\/\/your-server-ip:3000\/username\/repository.git<\/p>\n<p><span class=\"token comment\"># \u914d\u7f6e\u7528\u6237\u4fe1\u606f<\/span><br \/>\n<span class=\"token function\">git<\/span> config <span class=\"token parameter variable\">&#8211;global<\/span> user.name <span class=\"token string\">&#034;your-username&#034;<\/span><br \/>\n<span class=\"token function\">git<\/span> config <span class=\"token parameter variable\">&#8211;global<\/span> user.email <span class=\"token string\">&#034;your-email&#064;yourdomain.com&#034;<\/span><\/p>\n<h3>\u26a0\ufe0f \u5e38\u89c1\u95ee\u9898\u53ca\u89e3\u51b3\u65b9\u6848<\/h3>\n<p>\u5728 Windows \u73af\u5883\u4e0b\u642d\u5efa Gitea&#xff0c;\u6211\u4eec\u9047\u5230\u4e86\u4ee5\u4e0b\u5178\u578b\u95ee\u9898\u548c\u89e3\u51b3\u65b9\u6848&#xff1a;<\/p>\n<h4>\u95ee\u9898 1&#xff1a;Git \u547d\u4ee4\u65e0\u6cd5\u8bc6\u522b<\/h4>\n<p>\u73b0\u8c61&#xff1a;<\/p>\n<p>&#039;git&#039; \u4e0d\u662f\u5185\u90e8\u6216\u5916\u90e8\u547d\u4ee4&#xff0c;\u4e5f\u4e0d\u662f\u53ef\u8fd0\u884c\u7684\u7a0b\u5e8f\u6216\u6279\u5904\u7406\u6587\u4ef6<\/p>\n<p>\u539f\u56e0\u5206\u6790&#xff1a;<\/p>\n<ul>\n<li>Git \u672a\u5b89\u88c5\u6216\u672a\u6b63\u786e\u6dfb\u52a0\u5230 PATH \u73af\u5883\u53d8\u91cf<\/li>\n<li>PowerShell \u4f1a\u8bdd\u672a\u5237\u65b0\u73af\u5883\u53d8\u91cf<\/li>\n<\/ul>\n<p>\u89e3\u51b3\u65b9\u6848&#xff1a;<\/p>\n<p><span class=\"token comment\"># \u65b9\u6848 1&#xff1a;\u624b\u52a8\u6dfb\u52a0 Git \u5230 PATH<\/span><br \/>\n<span class=\"token variable\">$gitPath<\/span> &#061; <span class=\"token string\">&#034;C:\\\\Program Files\\\\Git\\\\bin&#034;<\/span><br \/>\n<span class=\"token keyword\">if<\/span> <span class=\"token punctuation\">(<\/span><span class=\"token function\">Test-Path<\/span> <span class=\"token variable\">$gitPath<\/span><span class=\"token punctuation\">)<\/span> <span class=\"token punctuation\">{<\/span><br \/>\n    <span class=\"token variable\">$currentPath<\/span> &#061; <span class=\"token namespace\">[Environment]<\/span>::GetEnvironmentVariable<span class=\"token punctuation\">(<\/span><span class=\"token string\">&#034;PATH&#034;<\/span><span class=\"token punctuation\">,<\/span> <span class=\"token string\">&#034;Machine&#034;<\/span><span class=\"token punctuation\">)<\/span><br \/>\n    <span class=\"token keyword\">if<\/span> <span class=\"token punctuation\">(<\/span><span class=\"token variable\">$currentPath<\/span> <span class=\"token operator\">-notlike<\/span> <span class=\"token string\">&#034;*<span class=\"token variable\">$gitPath<\/span>*&#034;<\/span><span class=\"token punctuation\">)<\/span> <span class=\"token punctuation\">{<\/span><br \/>\n        <span class=\"token namespace\">[Environment]<\/span>::SetEnvironmentVariable<span class=\"token punctuation\">(<\/span><span class=\"token string\">&#034;PATH&#034;<\/span><span class=\"token punctuation\">,<\/span> <span class=\"token string\">&#034;<span class=\"token variable\">$currentPath<\/span>;<span class=\"token variable\">$gitPath<\/span>&#034;<\/span><span class=\"token punctuation\">,<\/span> <span class=\"token string\">&#034;Machine&#034;<\/span><span class=\"token punctuation\">)<\/span><br \/>\n    <span class=\"token punctuation\">}<\/span><br \/>\n<span class=\"token punctuation\">}<\/span><\/p>\n<p><span class=\"token comment\"># \u65b9\u6848 2&#xff1a;\u5237\u65b0\u5f53\u524d\u4f1a\u8bdd\u7684\u73af\u5883\u53d8\u91cf<\/span><br \/>\n<span class=\"token variable\">$env<\/span>:PATH &#061; <span class=\"token namespace\">[System.Environment]<\/span>::GetEnvironmentVariable<span class=\"token punctuation\">(<\/span><span class=\"token string\">&#034;PATH&#034;<\/span><span class=\"token punctuation\">,<\/span><span class=\"token string\">&#034;Machine&#034;<\/span><span class=\"token punctuation\">)<\/span> <span class=\"token operator\">&#043;<\/span> <span class=\"token string\">&#034;;&#034;<\/span> <span class=\"token operator\">&#043;<\/span> <span class=\"token namespace\">[System.Environment]<\/span>::GetEnvironmentVariable<span class=\"token punctuation\">(<\/span><span class=\"token string\">&#034;PATH&#034;<\/span><span class=\"token punctuation\">,<\/span><span class=\"token string\">&#034;User&#034;<\/span><span class=\"token punctuation\">)<\/span><\/p>\n<p><span class=\"token comment\"># \u65b9\u6848 3&#xff1a;\u91cd\u65b0\u542f\u52a8 PowerShell \u6216\u91cd\u542f\u7cfb\u7edf<\/span><\/p>\n<h4>\u95ee\u9898 2&#xff1a;\u963f\u91cc\u4e91\u5b89\u5168\u7ec4\u7aef\u53e3\u8bbf\u95ee<\/h4>\n<p>\u73b0\u8c61&#xff1a;<\/p>\n<p>\u672c\u5730\u53ef\u4ee5\u8bbf\u95ee http:\/\/localhost:3000<br \/>\n\u5916\u7f51\u65e0\u6cd5\u8bbf\u95ee http:\/\/your-server-ip:3000<br \/>\n\u6d4f\u89c8\u5668\u663e\u793a&#xff1a;\u6b64\u7ad9\u70b9\u65e0\u6cd5\u8bbf\u95ee<\/p>\n<p>\u539f\u56e0\u5206\u6790&#xff1a;<\/p>\n<ul>\n<li>\u963f\u91cc\u4e91\u5b89\u5168\u7ec4\u672a\u5f00\u653e 3000 \u7aef\u53e3<\/li>\n<li>Windows \u9632\u706b\u5899\u963b\u6b62\u5916\u90e8\u8bbf\u95ee<\/li>\n<li>Gitea \u914d\u7f6e\u53ea\u76d1\u542c localhost<\/li>\n<\/ul>\n<p>\u89e3\u51b3\u65b9\u6848&#xff1a;<\/p>\n<p><span class=\"token comment\"># 1. \u963f\u91cc\u4e91\u63a7\u5236\u53f0\u914d\u7f6e\u5b89\u5168\u7ec4<\/span><br \/>\n<span class=\"token comment\"># ECS \u5b9e\u4f8b \u2192 \u5b89\u5168\u7ec4 \u2192 \u914d\u7f6e\u89c4\u5219 \u2192 \u6dfb\u52a0\u5b89\u5168\u7ec4\u89c4\u5219<\/span><br \/>\n<span class=\"token comment\"># \u7aef\u53e3\u8303\u56f4&#xff1a;3000\/3000&#xff0c;\u6388\u6743\u5bf9\u8c61&#xff1a;0.0.0.0\/0<\/span><\/p>\n<p><span class=\"token comment\"># 2. Windows \u9632\u706b\u5899\u914d\u7f6e<\/span><br \/>\n<span class=\"token function\">New-NetFirewallRule<\/span> <span class=\"token operator\">&#8211;<\/span>DisplayName <span class=\"token string\">&#034;Gitea-External&#034;<\/span> <span class=\"token operator\">&#8211;<\/span>Direction Inbound <span class=\"token operator\">&#8211;<\/span>Protocol TCP <span class=\"token operator\">&#8211;<\/span>LocalPort 3000 <span class=\"token operator\">&#8211;<\/span>Action Allow<br \/>\n<span class=\"token function\">New-NetFirewallRule<\/span> <span class=\"token operator\">&#8211;<\/span>DisplayName <span class=\"token string\">&#034;Gitea-External-Out&#034;<\/span> <span class=\"token operator\">&#8211;<\/span>Direction Outbound <span class=\"token operator\">&#8211;<\/span>Protocol TCP <span class=\"token operator\">&#8211;<\/span>LocalPort 3000 <span class=\"token operator\">&#8211;<\/span>Action Allow<\/p>\n<p><span class=\"token comment\"># 3. \u4fee\u6539 Gitea \u914d\u7f6e\u76d1\u542c\u6240\u6709\u63a5\u53e3<\/span><br \/>\n<span class=\"token comment\"># \u7f16\u8f91 C:\\\\gitea\\\\custom\\\\conf\\\\app.ini<\/span><br \/>\n<span class=\"token namespace\">[server]<\/span><br \/>\nHTTP_ADDR &#061; 0<span class=\"token punctuation\">.<\/span>0<span class=\"token punctuation\">.<\/span>0<span class=\"token punctuation\">.<\/span>0  <span class=\"token comment\"># \u91cd\u8981&#xff1a;\u76d1\u542c\u6240\u6709\u7f51\u7edc\u63a5\u53e3<\/span><br \/>\nDOMAIN &#061; your-server-ip  <span class=\"token comment\"># \u66ff\u6362\u4e3a\u60a8\u7684\u5b9e\u9645IP<\/span><br \/>\nROOT_URL &#061; http:<span class=\"token operator\">\/<\/span><span class=\"token operator\">\/<\/span>your-server-ip:3000\/<\/p>\n<p><span class=\"token comment\"># 4. \u91cd\u542f Gitea \u670d\u52a1<\/span><br \/>\n<span class=\"token function\">Restart-Service<\/span> Gitea<\/p>\n<h4>\u95ee\u9898 3&#xff1a;\u7aef\u53e3 3000 \u88ab\u5360\u7528<\/h4>\n<p>\u73b0\u8c61&#xff1a;<\/p>\n<p>listen tcp :3000: bind: Only one usage of each socket address is normally permitted<\/p>\n<p>\u539f\u56e0\u5206\u6790&#xff1a;<\/p>\n<ul>\n<li>IIS \u6216\u5176\u4ed6 Web \u670d\u52a1\u5360\u7528\u4e86 3000 \u7aef\u53e3<\/li>\n<li>\u4e4b\u524d\u7684 Gitea \u8fdb\u7a0b\u672a\u6b63\u786e\u5173\u95ed<\/li>\n<\/ul>\n<p>\u89e3\u51b3\u65b9\u6848&#xff1a;<\/p>\n<p><span class=\"token comment\"># \u67e5\u770b\u5360\u7528\u7aef\u53e3\u7684\u8fdb\u7a0b<\/span><br \/>\nnetstat <span class=\"token operator\">&#8211;<\/span>ano <span class=\"token punctuation\">|<\/span> findstr :3000<\/p>\n<p><span class=\"token comment\"># \u67e5\u770b\u8fdb\u7a0b\u8be6\u60c5<\/span><br \/>\n<span class=\"token function\">Get-Process<\/span> <span class=\"token operator\">&#8211;<\/span>Id &lt;PID&gt;<\/p>\n<p><span class=\"token comment\"># \u7ec8\u6b62\u5360\u7528\u8fdb\u7a0b<\/span><br \/>\n<span class=\"token function\">Stop-Process<\/span> <span class=\"token operator\">&#8211;<\/span>Id &lt;PID&gt; <span class=\"token operator\">&#8211;<\/span>Force<\/p>\n<p><span class=\"token comment\"># \u6216\u8005\u4f7f\u7528\u5176\u4ed6\u7aef\u53e3<\/span><br \/>\n<span class=\"token punctuation\">.<\/span>\\\\gitea<span class=\"token punctuation\">.<\/span>exe web <span class=\"token operator\">&#8212;<\/span>port 3001<\/p>\n<p>\u73b0\u8c61&#xff1a;<\/p>\n<ul>\n<li>\u65e0\u6cd5\u521b\u5efa\u76ee\u5f55\u6216\u5199\u5165\u6587\u4ef6<\/li>\n<li>\u670d\u52a1\u5b89\u88c5\u5931\u8d25<\/li>\n<\/ul>\n<p>\u539f\u56e0\u5206\u6790&#xff1a;<\/p>\n<ul>\n<li>\u5f53\u524d\u7528\u6237\u6743\u9650\u4e0d\u8db3<\/li>\n<li>UAC&#xff08;\u7528\u6237\u8d26\u6237\u63a7\u5236&#xff09;\u9650\u5236<\/li>\n<\/ul>\n<p>\u89e3\u51b3\u65b9\u6848&#xff1a;<\/p>\n<p><span class=\"token comment\"># \u4ee5\u7ba1\u7406\u5458\u8eab\u4efd\u8fd0\u884c PowerShell<\/span><br \/>\n<span class=\"token comment\"># \u68c0\u67e5\u7ba1\u7406\u5458\u6743\u9650<\/span><br \/>\n<span class=\"token variable\">$isAdmin<\/span> &#061; <span class=\"token punctuation\">(<\/span><span class=\"token namespace\">[Security.Principal.WindowsPrincipal]<\/span> <span class=\"token namespace\">[Security.Principal.WindowsIdentity]<\/span>::GetCurrent<span class=\"token punctuation\">(<\/span><span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">.<\/span>IsInRole<span class=\"token punctuation\">(<\/span><span class=\"token namespace\">[Security.Principal.WindowsBuiltInRole]<\/span>::Administrator<span class=\"token punctuation\">)<\/span><br \/>\n<span class=\"token keyword\">if<\/span> <span class=\"token punctuation\">(<\/span><span class=\"token operator\">-not<\/span> <span class=\"token variable\">$isAdmin<\/span><span class=\"token punctuation\">)<\/span> <span class=\"token punctuation\">{<\/span><br \/>\n    <span class=\"token function\">Write-Host<\/span> <span class=\"token string\">&#034;\u8bf7\u4ee5\u7ba1\u7406\u5458\u8eab\u4efd\u8fd0\u884c PowerShell&#034;<\/span> <span class=\"token operator\">&#8211;<\/span>ForegroundColor Red<br \/>\n<span class=\"token punctuation\">}<\/span><\/p>\n<p><span class=\"token comment\"># \u4fee\u590d\u76ee\u5f55\u6743\u9650<\/span><br \/>\nicacls <span class=\"token string\">&#034;C:\\\\gitea&#034;<\/span> <span class=\"token operator\">\/<\/span>grant <span class=\"token string\">&#034;<span class=\"token function\">$<span class=\"token punctuation\">(<\/span><span class=\"token variable\">$env<\/span>:USERNAME<span class=\"token punctuation\">)<\/span><\/span>:F&#034;<\/span> <span class=\"token operator\">\/<\/span>T<\/p>\n<h4>\u95ee\u9898 4&#xff1a;\u6570\u636e\u5e93\u8fde\u63a5\u5931\u8d25<\/h4>\n<p>\u73b0\u8c61&#xff1a;<\/p>\n<p>Database connection failed: database locked<\/p>\n<p>\u539f\u56e0\u5206\u6790&#xff1a;<\/p>\n<ul>\n<li>SQLite \u6570\u636e\u5e93\u88ab\u9501\u5b9a<\/li>\n<li>\u591a\u4e2a Gitea \u5b9e\u4f8b\u540c\u65f6\u8fd0\u884c<\/li>\n<li>\u6740\u6bd2\u8f6f\u4ef6\u5e72\u6270<\/li>\n<\/ul>\n<p>\u89e3\u51b3\u65b9\u6848&#xff1a;<\/p>\n<p><span class=\"token comment\"># \u505c\u6b62\u6240\u6709 Gitea \u8fdb\u7a0b<\/span><br \/>\n<span class=\"token function\">Get-Process<\/span> <span class=\"token punctuation\">|<\/span> <span class=\"token function\">Where-Object<\/span> <span class=\"token punctuation\">{<\/span><span class=\"token variable\">$_<\/span><span class=\"token punctuation\">.<\/span>ProcessName <span class=\"token operator\">-like<\/span> <span class=\"token string\">&#034;*gitea*&#034;<\/span><span class=\"token punctuation\">}<\/span> <span class=\"token punctuation\">|<\/span> <span class=\"token function\">Stop-Process<\/span> <span class=\"token operator\">&#8211;<\/span>Force<\/p>\n<p><span class=\"token comment\"># \u68c0\u67e5\u6570\u636e\u5e93\u6587\u4ef6\u6743\u9650<\/span><br \/>\n<span class=\"token function\">Get-Acl<\/span> <span class=\"token string\">&#034;C:\\\\gitea\\\\data\\\\gitea.db&#034;<\/span><\/p>\n<p><span class=\"token comment\"># \u4e34\u65f6\u5173\u95ed\u6740\u6bd2\u8f6f\u4ef6\u5b9e\u65f6\u4fdd\u62a4<\/span><br \/>\n<span class=\"token comment\"># \u6216\u5c06 Gitea \u76ee\u5f55\u6dfb\u52a0\u5230\u6740\u6bd2\u8f6f\u4ef6\u767d\u540d\u5355<\/span><\/p>\n<h4>\u95ee\u9898 5&#xff1a;\u9632\u706b\u5899\u963b\u6b62\u8bbf\u95ee<\/h4>\n<p>\u73b0\u8c61&#xff1a;<\/p>\n<ul>\n<li>\u672c\u673a\u53ef\u4ee5\u8bbf\u95ee&#xff0c;\u5176\u4ed6\u673a\u5668\u65e0\u6cd5\u8bbf\u95ee<\/li>\n<li>\u6d4f\u89c8\u5668\u663e\u793a\u8fde\u63a5\u8d85\u65f6<\/li>\n<\/ul>\n<p>\u89e3\u51b3\u65b9\u6848&#xff1a;<\/p>\n<p><span class=\"token comment\"># \u6dfb\u52a0\u9632\u706b\u5899\u89c4\u5219<\/span><br \/>\n<span class=\"token function\">New-NetFirewallRule<\/span> <span class=\"token operator\">&#8211;<\/span>DisplayName <span class=\"token string\">&#034;Gitea-Inbound&#034;<\/span> <span class=\"token operator\">&#8211;<\/span>Direction Inbound <span class=\"token operator\">&#8211;<\/span>Protocol TCP <span class=\"token operator\">&#8211;<\/span>LocalPort 3000 <span class=\"token operator\">&#8211;<\/span>Action Allow<br \/>\n<span class=\"token function\">New-NetFirewallRule<\/span> <span class=\"token operator\">&#8211;<\/span>DisplayName <span class=\"token string\">&#034;Gitea-Outbound&#034;<\/span> <span class=\"token operator\">&#8211;<\/span>Direction Outbound <span class=\"token operator\">&#8211;<\/span>Protocol TCP <span class=\"token operator\">&#8211;<\/span>LocalPort 3000 <span class=\"token operator\">&#8211;<\/span>Action Allow<\/p>\n<p><span class=\"token comment\"># \u67e5\u770b\u9632\u706b\u5899\u72b6\u6001<\/span><br \/>\n<span class=\"token function\">Get-NetFirewallProfile<\/span><\/p>\n<p><span class=\"token comment\"># \u4e34\u65f6\u5173\u95ed\u9632\u706b\u5899&#xff08;\u4e0d\u63a8\u8350&#xff09;<\/span><br \/>\n<span class=\"token comment\"># Set-NetFirewallProfile -Profile Domain,Public,Private -Enabled False<\/span><\/p>\n<h4>\u95ee\u9898 6&#xff1a;\u4ed3\u5e93\u521b\u5efa\u548c\u8fde\u63a5\u5faa\u73af\u5931\u8d25<\/h4>\n<p>\u73b0\u8c61&#xff1a;<\/p>\n<p>fatal: repository &#039;http:\/\/localhost:3000\/user\/repo.git&#039; not found<br \/>\nremote: Not found<\/p>\n<p>\u539f\u56e0\u5206\u6790&#xff1a;<\/p>\n<ul>\n<li>\u4ed3\u5e93\u9700\u8981\u5148\u5728 Gitea Web \u754c\u9762\u521b\u5efa&#xff0c;\u4f46 API \u521b\u5efa\u5931\u8d25<\/li>\n<li>Git push \u5230\u4e0d\u5b58\u5728\u7684\u8fdc\u7a0b\u4ed3\u5e93<\/li>\n<li>\u8ba4\u8bc1\u4fe1\u606f\u914d\u7f6e\u9519\u8bef&#xff0c;\u5bfc\u81f4\u91cd\u590d\u5c1d\u8bd5\u5931\u8d25<\/li>\n<\/ul>\n<p>\u89e3\u51b3\u65b9\u6848&#xff1a;<\/p>\n<p><span class=\"token comment\"># 1. \u624b\u52a8\u5728 Web \u754c\u9762\u521b\u5efa\u4ed3\u5e93<\/span><br \/>\n<span class=\"token comment\"># \u8bbf\u95ee http:\/\/localhost:3000&#xff0c;\u767b\u5f55\u540e\u70b9\u51fb &#034;&#043;&#034; \u521b\u5efa\u4ed3\u5e93<\/span><br \/>\n<span class=\"token comment\"># \u91cd\u8981&#xff1a;\u53d6\u6d88\u52fe\u9009 &#034;Initialize Repository&#034;<\/span><\/p>\n<p><span class=\"token comment\"># 2. \u9a8c\u8bc1\u4ed3\u5e93\u5b58\u5728\u540e\u518d\u8fde\u63a5<\/span><br \/>\ngit remote add origin http:<span class=\"token operator\">\/<\/span><span class=\"token operator\">\/<\/span>localhost:3000\/username\/repository<span class=\"token punctuation\">.<\/span>git<br \/>\ngit push <span class=\"token operator\">&#8211;<\/span>u origin master<\/p>\n<p><span class=\"token comment\"># 3. \u5982\u679c\u8ba4\u8bc1\u95ee\u9898&#xff0c;\u4f7f\u7528\u5d4c\u5165\u5f0f\u8ba4\u8bc1<\/span><br \/>\ngit remote <span class=\"token function\">set-url<\/span> origin http:<span class=\"token operator\">\/<\/span><span class=\"token operator\">\/<\/span>username:password&#064;localhost:3000\/username\/repository<span class=\"token punctuation\">.<\/span>git<\/p>\n<h4>\u95ee\u9898 7&#xff1a;\u73af\u5883\u53d8\u91cf\u4f1a\u8bdd\u4e22\u5931<\/h4>\n<p>\u73b0\u8c61&#xff1a;<\/p>\n<p># \u6bcf\u6b21\u65b0\u5f00 PowerShell \u90fd\u9700\u8981\u91cd\u65b0\u8bbe\u7f6e PATH<br \/>\ngit : \u65e0\u6cd5\u5c06&#034;git&#034;\u9879\u8bc6\u522b\u4e3a cmdlet\u3001\u51fd\u6570\u3001\u811a\u672c\u6587\u4ef6\u6216\u53ef\u8fd0\u884c\u7a0b\u5e8f\u7684\u540d\u79f0<\/p>\n<p>\u539f\u56e0\u5206\u6790&#xff1a;<\/p>\n<ul>\n<li>\u53ea\u8bbe\u7f6e\u4e86\u5f53\u524d\u4f1a\u8bdd\u7684\u73af\u5883\u53d8\u91cf<\/li>\n<li>\u6ca1\u6709\u6301\u4e45\u5316\u5230\u7cfb\u7edf\u7ea7\u522b<\/li>\n<li>\u91cd\u542f\u540e\u73af\u5883\u53d8\u91cf\u4e22\u5931<\/li>\n<\/ul>\n<p>\u89e3\u51b3\u65b9\u6848&#xff1a;<\/p>\n<p><span class=\"token comment\"># \u6c38\u4e45\u89e3\u51b3\u65b9\u6848&#xff1a;\u8bbe\u7f6e\u7cfb\u7edf\u7ea7\u73af\u5883\u53d8\u91cf<\/span><br \/>\n<span class=\"token variable\">$gitPath<\/span> &#061; <span class=\"token string\">&#034;C:\\\\Program Files\\\\Git\\\\bin&#034;<\/span><br \/>\n<span class=\"token variable\">$currentPath<\/span> &#061; <span class=\"token namespace\">[Environment]<\/span>::GetEnvironmentVariable<span class=\"token punctuation\">(<\/span><span class=\"token string\">&#034;PATH&#034;<\/span><span class=\"token punctuation\">,<\/span> <span class=\"token string\">&#034;Machine&#034;<\/span><span class=\"token punctuation\">)<\/span><br \/>\n<span class=\"token keyword\">if<\/span> <span class=\"token punctuation\">(<\/span><span class=\"token variable\">$currentPath<\/span> <span class=\"token operator\">-notlike<\/span> <span class=\"token string\">&#034;*<span class=\"token variable\">$gitPath<\/span>*&#034;<\/span><span class=\"token punctuation\">)<\/span> <span class=\"token punctuation\">{<\/span><br \/>\n    <span class=\"token namespace\">[Environment]<\/span>::SetEnvironmentVariable<span class=\"token punctuation\">(<\/span><span class=\"token string\">&#034;PATH&#034;<\/span><span class=\"token punctuation\">,<\/span> <span class=\"token string\">&#034;<span class=\"token variable\">$currentPath<\/span>;<span class=\"token variable\">$gitPath<\/span>&#034;<\/span><span class=\"token punctuation\">,<\/span> <span class=\"token string\">&#034;Machine&#034;<\/span><span class=\"token punctuation\">)<\/span><br \/>\n<span class=\"token punctuation\">}<\/span><\/p>\n<p><span class=\"token comment\"># \u9a8c\u8bc1\u8bbe\u7f6e\u6210\u529f<\/span><br \/>\n<span class=\"token namespace\">[Environment]<\/span>::GetEnvironmentVariable<span class=\"token punctuation\">(<\/span><span class=\"token string\">&#034;PATH&#034;<\/span><span class=\"token punctuation\">,<\/span> <span class=\"token string\">&#034;Machine&#034;<\/span><span class=\"token punctuation\">)<\/span> <span class=\"token operator\">&#8211;<\/span>split <span class=\"token string\">&#039;;&#039;<\/span> <span class=\"token punctuation\">|<\/span> <span class=\"token function\">Select-String<\/span> <span class=\"token string\">&#034;Git&#034;<\/span><\/p>\n<h4>\u95ee\u9898 8&#xff1a;Gitea \u670d\u52a1\u542f\u52a8\u5931\u8d25<\/h4>\n<p>\u73b0\u8c61&#xff1a;<\/p>\n<p>Error: Git not found, Gitea does not work when Git is not installed.<\/p>\n<p>\u539f\u56e0\u5206\u6790&#xff1a;<\/p>\n<ul>\n<li>Gitea \u542f\u52a8\u65f6\u65e0\u6cd5\u627e\u5230 Git \u53ef\u6267\u884c\u6587\u4ef6<\/li>\n<li>\u670d\u52a1\u8fd0\u884c\u5728\u4e0d\u540c\u7684\u73af\u5883\u4e0a\u4e0b\u6587\u4e2d<\/li>\n<li>\u7cfb\u7edf\u670d\u52a1\u7684 PATH \u73af\u5883\u4e0e\u7528\u6237\u4f1a\u8bdd\u4e0d\u540c<\/li>\n<\/ul>\n<p>\u89e3\u51b3\u65b9\u6848&#xff1a;<\/p>\n<p><span class=\"token comment\"># \u65b9\u6848 1&#xff1a;\u5728\u542f\u52a8 Gitea \u524d\u786e\u4fdd\u73af\u5883\u53d8\u91cf<\/span><br \/>\n<span class=\"token variable\">$env<\/span>:PATH <span class=\"token operator\">&#043;&#061;<\/span> <span class=\"token string\">&#034;;C:\\\\Program Files\\\\Git\\\\bin&#034;<\/span><br \/>\ncd C:\\\\gitea<br \/>\n<span class=\"token punctuation\">.<\/span>\\\\gitea<span class=\"token punctuation\">.<\/span>exe web<\/p>\n<p><span class=\"token comment\"># \u65b9\u6848 2&#xff1a;\u4fee\u6539\u670d\u52a1\u914d\u7f6e&#xff08;\u4f7f\u7528 NSSM \u65f6&#xff09;<\/span><br \/>\n<span class=\"token comment\"># \u5728 NSSM \u670d\u52a1\u914d\u7f6e\u4e2d\u7684 Environment \u6807\u7b7e\u9875\u6dfb\u52a0&#xff1a;<\/span><br \/>\n<span class=\"token comment\"># PATH&#061;C:\\\\Program Files\\\\Git\\\\bin;%PATH%<\/span><\/p>\n<p><span class=\"token comment\"># \u65b9\u6848 3&#xff1a;\u9a8c\u8bc1 Git \u53ef\u7528\u6027\u518d\u542f\u52a8<\/span><br \/>\n<span class=\"token keyword\">if<\/span> <span class=\"token punctuation\">(<\/span><span class=\"token function\">Get-Command<\/span> git <span class=\"token operator\">&#8211;<\/span>ErrorAction SilentlyContinue<span class=\"token punctuation\">)<\/span> <span class=\"token punctuation\">{<\/span><br \/>\n    <span class=\"token punctuation\">.<\/span>\\\\gitea<span class=\"token punctuation\">.<\/span>exe web<br \/>\n<span class=\"token punctuation\">}<\/span> <span class=\"token keyword\">else<\/span> <span class=\"token punctuation\">{<\/span><br \/>\n    <span class=\"token function\">Write-Host<\/span> <span class=\"token string\">&#034;\u8bf7\u5148\u89e3\u51b3 Git \u73af\u5883\u53d8\u91cf\u95ee\u9898&#034;<\/span> <span class=\"token operator\">&#8211;<\/span>ForegroundColor Red<br \/>\n<span class=\"token punctuation\">}<\/span><\/p>\n<h4>\u95ee\u9898 9&#xff1a;\u7528\u6237\u6ce8\u518c\u5b89\u5168\u95ee\u9898<\/h4>\n<p>\u73b0\u8c61&#xff1a;<\/p>\n<ul>\n<li>\u9ed8\u8ba4\u5141\u8bb8\u4efb\u4f55\u4eba\u6ce8\u518c\u8d26\u6237<\/li>\n<li>\u5783\u573e\u8d26\u6237\u6ce8\u518c\u98ce\u9669<\/li>\n<\/ul>\n<p>\u539f\u56e0\u5206\u6790&#xff1a;<\/p>\n<ul>\n<li>Gitea \u9ed8\u8ba4\u914d\u7f6e\u5141\u8bb8\u516c\u5f00\u6ce8\u518c<\/li>\n<li>\u6ca1\u6709\u914d\u7f6e\u7ba1\u7406\u5458\u5ba1\u6838\u673a\u5236<\/li>\n<\/ul>\n<p>\u89e3\u51b3\u65b9\u6848&#xff1a;<\/p>\n<p># \u7f16\u8f91 C:\\\\gitea\\\\custom\\\\conf\\\\app.ini<br \/>\n[service]<br \/>\nDISABLE_REGISTRATION &#061; true<br \/>\nREGISTER_EMAIL_CONFIRM &#061; false<br \/>\nENABLE_CAPTCHA &#061; true<br \/>\nREQUIRE_SIGNIN_VIEW &#061; false<\/p>\n<p># \u91cd\u542f Gitea \u670d\u52a1\u4f7f\u914d\u7f6e\u751f\u6548<br \/>\nRestart-Service Gitea<\/p>\n<h4>\u95ee\u9898 10&#xff1a;PowerShell \u6267\u884c\u7b56\u7565\u9650\u5236<\/h4>\n<p>\u73b0\u8c61&#xff1a;<\/p>\n<p>\u65e0\u6cd5\u52a0\u8f7d\u6587\u4ef6&#xff0c;\u56e0\u4e3a\u5728\u6b64\u7cfb\u7edf\u4e0a\u7981\u6b62\u8fd0\u884c\u811a\u672c<\/p>\n<p>\u539f\u56e0\u5206\u6790&#xff1a;<\/p>\n<ul>\n<li>Windows \u9ed8\u8ba4\u7684 PowerShell \u6267\u884c\u7b56\u7565\u8fc7\u4e8e\u4e25\u683c<\/li>\n<li>\u963b\u6b62\u811a\u672c\u6267\u884c&#xff0c;\u5f71\u54cd\u81ea\u52a8\u5316\u914d\u7f6e<\/li>\n<\/ul>\n<p>\u89e3\u51b3\u65b9\u6848&#xff1a;<\/p>\n<p><span class=\"token comment\"># \u68c0\u67e5\u5f53\u524d\u6267\u884c\u7b56\u7565<\/span><br \/>\n<span class=\"token function\">Get-ExecutionPolicy<\/span> <span class=\"token operator\">&#8211;<\/span>List<\/p>\n<p><span class=\"token comment\"># \u8bbe\u7f6e\u5f53\u524d\u7528\u6237\u7684\u6267\u884c\u7b56\u7565<\/span><br \/>\n<span class=\"token function\">Set-ExecutionPolicy<\/span> <span class=\"token operator\">&#8211;<\/span>ExecutionPolicy RemoteSigned <span class=\"token operator\">&#8211;<\/span>Scope CurrentUser<\/p>\n<p><span class=\"token comment\"># \u9a8c\u8bc1\u8bbe\u7f6e<\/span><br \/>\n<span class=\"token function\">Get-ExecutionPolicy<\/span> <span class=\"token operator\">&#8211;<\/span>Scope CurrentUser<\/p>\n<h3>&#x1f6e0;\ufe0f \u9ad8\u7ea7\u914d\u7f6e\u4e0e\u4f18\u5316<\/h3>\n<h4>\u6027\u80fd\u4f18\u5316\u914d\u7f6e<\/h4>\n<p>\u7f16\u8f91 C:\\\\gitea\\\\custom\\\\conf\\\\app.ini&#xff1a;<\/p>\n<p>[server]<br \/>\nOFFLINE_MODE &#061; true<br \/>\nDISABLE_ROUTER_LOG &#061; true<\/p>\n<p>[database]<br \/>\nMAX_IDLE_CONNS &#061; 30<br \/>\nMAX_OPEN_CONNS &#061; 300<br \/>\nCONN_MAX_LIFETIME &#061; 3600<\/p>\n<p>[indexer]<br \/>\nISSUE_INDEXER_TYPE &#061; bleve<br \/>\nREPO_INDEXER_ENABLED &#061; true<\/p>\n<p>[cache]<br \/>\nENABLED &#061; true<br \/>\nADAPTER &#061; memory<br \/>\nINTERVAL &#061; 60<\/p>\n<p>[session]<br \/>\nPROVIDER &#061; memory<\/p>\n<h4>\u5b89\u5168\u914d\u7f6e<\/h4>\n<p>[security]<br \/>\nINSTALL_LOCK &#061; true<br \/>\nSECRET_KEY &#061; &lt;\u751f\u6210\u4e00\u4e2a\u968f\u673a\u7684\u5bc6\u94a5&gt;<br \/>\nDISABLE_GIT_HOOKS &#061; false<br \/>\nDISABLE_WEBHOOKS &#061; false<\/p>\n<p>[service]<br \/>\nDISABLE_REGISTRATION &#061; true<br \/>\nREQUIRE_SIGNIN_VIEW &#061; false<br \/>\nENABLE_CAPTCHA &#061; true<\/p>\n<h3>&#x1f4f1; \u5b9e\u9645\u90e8\u7f72\u6848\u4f8b<\/h3>\n<h4>\u963f\u91cc\u4e91\u670d\u52a1\u5668\u914d\u7f6e\u793a\u4f8b<\/h4>\n<p>\u670d\u52a1\u5668\u4fe1\u606f&#xff1a;<\/p>\n<ul>\n<li>\u5b9e\u4f8b\u7c7b\u578b&#xff1a;\u963f\u91cc\u4e91 ECS Windows Server 2019<\/li>\n<li>\u5916\u7f51IP&#xff1a;your-public-ip&#xff08;\u8bf7\u66ff\u6362\u4e3a\u60a8\u7684\u5b9e\u9645\u516c\u7f51IP&#xff09;<\/li>\n<li>\u5185\u7f51IP&#xff1a;your-private-ip&#xff08;\u8bf7\u66ff\u6362\u4e3a\u60a8\u7684\u5b9e\u9645\u5185\u7f51IP&#xff09;<\/li>\n<li>\u914d\u7f6e\u89c4\u683c&#xff1a;2\u68384GB<\/li>\n<li>\u7cfb\u7edf\u76d8&#xff1a;40GB SSD<\/li>\n<\/ul>\n<p>\u7528\u6237\u8d26\u6237\u914d\u7f6e\u793a\u4f8b&#xff1a;<\/p>\n<p>\u7ba1\u7406\u5458\u8d26\u6237&#xff1a;<br \/>\n&#8211; \u7528\u6237\u540d&#xff1a;admin&#xff08;\u5efa\u8bae\u4fee\u6539\u4e3a\u81ea\u5b9a\u4e49\u7528\u6237\u540d&#xff09;<br \/>\n&#8211; \u5bc6\u7801&#xff1a;\u8bf7\u8bbe\u7f6e\u590d\u6742\u5bc6\u7801&#xff08;\u81f3\u5c1112\u4f4d&#xff0c;\u5305\u542b\u5927\u5c0f\u5199\u5b57\u6bcd\u3001\u6570\u5b57\u3001\u7279\u6b8a\u5b57\u7b26&#xff09;<br \/>\n&#8211; \u90ae\u7bb1&#xff1a;admin&#064;yourdomain.com<\/p>\n<p>\u666e\u901a\u7528\u6237&#xff1a;<br \/>\n&#8211; \u7528\u6237\u540d&#xff1a;your-username&#xff08;\u81ea\u5b9a\u4e49\u7528\u6237\u540d&#xff09;<br \/>\n&#8211; \u5bc6\u7801&#xff1a;\u8bf7\u8bbe\u7f6e\u590d\u6742\u5bc6\u7801<br \/>\n&#8211; \u90ae\u7bb1&#xff1a;your-email&#064;yourdomain.com<\/p>\n<p>\u26a0\ufe0f \u5b89\u5168\u63d0\u9192&#xff1a;\u7edd\u4e0d\u8981\u5728\u751f\u4ea7\u73af\u5883\u4f7f\u7528\u793a\u4f8b\u5bc6\u7801&#xff01;\u8bf7\u52a1\u5fc5\u8bbe\u7f6e\u590d\u6742\u7684\u552f\u4e00\u5bc6\u7801\u3002<\/p>\n<h4>\u521b\u5efa\u7b2c\u4e00\u4e2a\u4ed3\u5e93<\/h4>\n<p><span class=\"token comment\"># 1. \u521b\u5efa\u672c\u5730\u9879\u76ee\u76ee\u5f55<\/span><br \/>\n<span class=\"token function\">New-Item<\/span> <span class=\"token operator\">&#8211;<\/span>ItemType Directory <span class=\"token operator\">&#8211;<\/span>Path <span class=\"token string\">&#034;C:\\\\Projects\\\\TestGitSync&#034;<\/span> <span class=\"token operator\">&#8211;<\/span>Force<br \/>\n<span class=\"token function\">Set-Location<\/span> <span class=\"token string\">&#034;C:\\\\Projects\\\\TestGitSync&#034;<\/span><\/p>\n<p><span class=\"token comment\"># 2. \u521d\u59cb\u5316 Git \u4ed3\u5e93<\/span><br \/>\ngit init<br \/>\ngit config user<span class=\"token punctuation\">.<\/span>name <span class=\"token string\">&#034;your-username&#034;<\/span>  <span class=\"token comment\"># \u66ff\u6362\u4e3a\u60a8\u7684\u7528\u6237\u540d<\/span><br \/>\ngit config user<span class=\"token punctuation\">.<\/span>email <span class=\"token string\">&#034;your-email&#064;yourdomain.com&#034;<\/span>  <span class=\"token comment\"># \u66ff\u6362\u4e3a\u60a8\u7684\u90ae\u7bb1<\/span><\/p>\n<p><span class=\"token comment\"># 3. \u521b\u5efa\u521d\u59cb\u6587\u4ef6<\/span><br \/>\n<span class=\"token string\">&#034;# TestGit Project&#034;<\/span> <span class=\"token punctuation\">|<\/span> <span class=\"token function\">Out-File<\/span> <span class=\"token operator\">&#8211;<\/span>FilePath <span class=\"token string\">&#034;README.md&#034;<\/span> <span class=\"token operator\">&#8211;<\/span>Encoding UTF8<br \/>\n&#064;<span class=\"token string\">&#034;<br \/>\ndef hello_world(name&#061;&#034;<\/span>World<span class=\"token string\">&#034;):<br \/>\n    print(f&#034;<\/span>Hello<span class=\"token punctuation\">,<\/span> <span class=\"token punctuation\">{<\/span>name<span class=\"token punctuation\">}<\/span><span class=\"token operator\">!<\/span><span class=\"token string\">&#034;)<br \/>\n    return f&#034;<\/span>Welcome to <span class=\"token punctuation\">{<\/span>name<span class=\"token punctuation\">}<\/span>&#039;s repository<span class=\"token string\">&#034;<\/p>\n<p>if __name__ &#061;&#061; &#034;<\/span>__main__<span class=\"token string\">&#034;:<br \/>\n    hello_world(&#034;<\/span>Gitea<span class=\"token string\">&#034;)<br \/>\n&#034;<\/span>&#064; <span class=\"token punctuation\">|<\/span> <span class=\"token function\">Out-File<\/span> <span class=\"token operator\">&#8211;<\/span>FilePath <span class=\"token string\">&#034;hello_world.py&#034;<\/span> <span class=\"token operator\">&#8211;<\/span>Encoding UTF8<\/p>\n<p><span class=\"token comment\"># 4. \u63d0\u4ea4\u5230\u672c\u5730\u4ed3\u5e93<\/span><br \/>\ngit add <span class=\"token punctuation\">.<\/span><br \/>\ngit commit <span class=\"token operator\">&#8211;<\/span>m <span class=\"token string\">&#034;Initial commit: Add README.md and hello_world.py&#034;<\/span><\/p>\n<p><span class=\"token comment\"># 5. \u8fde\u63a5\u8fdc\u7a0b\u4ed3\u5e93&#xff08;\u5148\u5728 Web \u754c\u9762\u521b\u5efa\u4ed3\u5e93 TestGit&#xff09;<\/span><br \/>\ngit remote add origin http:<span class=\"token operator\">\/<\/span><span class=\"token operator\">\/<\/span>your-server-ip:3000\/your-username\/TestGit<span class=\"token punctuation\">.<\/span>git<br \/>\ngit push <span class=\"token operator\">&#8211;<\/span>u origin main<\/p>\n<h4>\u8de8\u5e73\u53f0\u8bbf\u95ee\u9a8c\u8bc1<\/h4>\n<p>Windows \u5ba2\u6237\u7aef\u6d4b\u8bd5&#xff1a;<\/p>\n<p># \u514b\u9686\u4ed3\u5e93<br \/>\ngit clone http:\/\/your-server-ip:3000\/your-username\/TestGit.git<br \/>\ncd TestGit<\/p>\n<p># \u4fee\u6539\u6587\u4ef6<br \/>\necho &#034;# Updated from Windows client&#034; &gt;&gt; README.md<br \/>\ngit add .<br \/>\ngit commit -m &#034;Update from Windows client&#034;<br \/>\ngit push origin main<\/p>\n<p>Mac \u5ba2\u6237\u7aef\u6d4b\u8bd5&#xff1a;<\/p>\n<p><span class=\"token comment\"># \u514b\u9686\u4ed3\u5e93<\/span><br \/>\n<span class=\"token function\">git<\/span> clone http:\/\/your-server-ip:3000\/your-username\/TestGit.git<br \/>\n<span class=\"token builtin class-name\">cd<\/span> TestGit<\/p>\n<p><span class=\"token comment\"># \u4fee\u6539\u6587\u4ef6  <\/span><br \/>\n<span class=\"token builtin class-name\">echo<\/span> <span class=\"token string\">&#034;# Updated from Mac client&#034;<\/span> <span class=\"token operator\">&gt;&gt;<\/span> README.md<br \/>\n<span class=\"token function\">git<\/span> <span class=\"token function\">add<\/span> <span class=\"token builtin class-name\">.<\/span><br \/>\n<span class=\"token function\">git<\/span> commit <span class=\"token parameter variable\">-m<\/span> <span class=\"token string\">&#034;Update from Mac client&#034;<\/span><br \/>\n<span class=\"token function\">git<\/span> push origin main<\/p>\n<h4>\u5e38\u7528\u7ba1\u7406\u547d\u4ee4<\/h4>\n<p><span class=\"token comment\"># \u67e5\u770b Gitea \u670d\u52a1\u72b6\u6001<\/span><br \/>\n<span class=\"token function\">Get-Service<\/span> <span class=\"token operator\">&#8211;<\/span>Name Gitea<\/p>\n<p><span class=\"token comment\"># \u91cd\u542f Gitea \u670d\u52a1<\/span><br \/>\n<span class=\"token function\">Restart-Service<\/span> <span class=\"token operator\">&#8211;<\/span>Name Gitea<\/p>\n<p><span class=\"token comment\"># \u67e5\u770b Gitea \u65e5\u5fd7<\/span><br \/>\n<span class=\"token function\">Get-Content<\/span> <span class=\"token string\">&#034;C:\\\\gitea\\\\log\\\\gitea.log&#034;<\/span> <span class=\"token operator\">&#8211;<\/span>Tail 50<\/p>\n<p><span class=\"token comment\"># \u5907\u4efd Gitea \u6570\u636e<\/span><br \/>\n<span class=\"token function\">Copy-Item<\/span> <span class=\"token string\">&#034;C:\\\\gitea\\\\data&#034;<\/span> <span class=\"token string\">&#034;C:\\\\Backup\\\\gitea-data-<span class=\"token function\">$<span class=\"token punctuation\">(<\/span><span class=\"token function\">Get-Date<\/span> <span class=\"token operator\">&#8211;<\/span>Format <span class=\"token string\">&#039;yyyyMMdd&#039;<\/span><span class=\"token punctuation\">)<\/span><\/span>&#034;<\/span> <span class=\"token operator\">&#8211;<\/span>Recurse<\/p>\n<p><span class=\"token comment\"># \u521b\u5efa\u65b0\u7528\u6237&#xff08;\u547d\u4ee4\u884c\u65b9\u5f0f&#xff09;<\/span><br \/>\n<span class=\"token function\">Set-Location<\/span> <span class=\"token string\">&#034;C:\\\\gitea&#034;<\/span><br \/>\n<span class=\"token punctuation\">.<\/span>\\\\gitea<span class=\"token punctuation\">.<\/span>exe admin user create <span class=\"token operator\">&#8212;<\/span>admin <span class=\"token operator\">&#8212;<\/span>username newadmin <span class=\"token operator\">&#8212;<\/span>password NewPass123 <span class=\"token operator\">&#8212;<\/span>email newadmin&#064;example<span class=\"token punctuation\">.<\/span>com<\/p>\n<h3>&#x1f510; \u5b89\u5168\u5efa\u8bae<\/h3>\n<li>\n<p>\u5b9a\u671f\u5907\u4efd&#xff1a;<\/p>\n<p><span class=\"token comment\"># \u521b\u5efa\u5b9a\u65f6\u5907\u4efd\u811a\u672c<\/span><br \/>\n<span class=\"token variable\">$backupScript<\/span> &#061; &#064;<span class=\"token string\">&#034;<br \/>\n&#096;<span class=\"token variable\">$date<\/span> &#061; Get-Date -Format &#034;<\/span>yyyyMMdd_HHmmss<span class=\"token string\">&#034;<br \/>\nCopy-Item &#034;<\/span>C:\\\\gitea\\\\<span class=\"token keyword\">data<\/span><span class=\"token string\">&#034; &#034;<\/span>D:\\\\Backup\\\\gitea_&#096;<span class=\"token variable\">$date<\/span><span class=\"token string\">&#034; -Recurse<br \/>\n&#034;<\/span>&#064;<br \/>\n<span class=\"token variable\">$backupScript<\/span> <span class=\"token punctuation\">|<\/span> <span class=\"token function\">Out-File<\/span> <span class=\"token string\">&#034;C:\\\\Scripts\\\\backup-gitea.ps1&#034;<\/span><\/p>\n<p><span class=\"token comment\"># \u521b\u5efa\u8ba1\u5212\u4efb\u52a1<\/span><br \/>\n<span class=\"token variable\">$action<\/span> &#061; <span class=\"token function\">New-ScheduledTaskAction<\/span> <span class=\"token operator\">&#8211;<\/span>Execute <span class=\"token string\">&#039;PowerShell.exe&#039;<\/span> <span class=\"token operator\">&#8211;<\/span>Argument <span class=\"token string\">&#039;-File C:\\\\Scripts\\\\backup-gitea.ps1&#039;<\/span><br \/>\n<span class=\"token variable\">$trigger<\/span> &#061; <span class=\"token function\">New-ScheduledTaskTrigger<\/span> <span class=\"token operator\">&#8211;<\/span>Daily <span class=\"token operator\">&#8211;<\/span>At 2:00AM<br \/>\n<span class=\"token function\">Register-ScheduledTask<\/span> <span class=\"token operator\">&#8211;<\/span>Action <span class=\"token variable\">$action<\/span> <span class=\"token operator\">&#8211;<\/span>Trigger <span class=\"token variable\">$trigger<\/span> <span class=\"token operator\">&#8211;<\/span>TaskName <span class=\"token string\">&#034;Gitea Backup&#034;<\/span><\/p>\n<\/li>\n<li>\n<p>\u5f3a\u5bc6\u7801\u7b56\u7565&#xff1a;\u5728\u7ba1\u7406\u754c\u9762\u8bbe\u7f6e\u5bc6\u7801\u590d\u6742\u5ea6\u8981\u6c42<\/p>\n<\/li>\n<li>\n<p>\u7f51\u7edc\u5b89\u5168&#xff1a;\u914d\u7f6e\u9002\u5f53\u7684\u9632\u706b\u5899\u89c4\u5219&#xff0c;\u9650\u5236\u8bbf\u95ee\u6765\u6e90<\/p>\n<\/li>\n<li>\n<p>\u5b9a\u671f\u66f4\u65b0&#xff1a;\u5173\u6ce8 Gitea \u5b98\u65b9\u53d1\u5e03&#xff0c;\u53ca\u65f6\u66f4\u65b0\u5230\u6700\u65b0\u7248\u672c<\/p>\n<\/li>\n<h3>&#x1f680; \u4e0e\u73b0\u4ee3\u5f00\u53d1\u5de5\u5177\u96c6\u6210<\/h3>\n<h4>\u4e0e Windsurf IDE \u96c6\u6210<\/h4>\n<p><span class=\"token comment\"># 1. \u5728 Windsurf \u4e2d\u914d\u7f6e Git<\/span><br \/>\n<span class=\"token comment\"># \u6253\u5f00 Windsurf \u8bbe\u7f6e&#xff0c;\u914d\u7f6e Git \u8def\u5f84\u4e3a&#xff1a;C:\\\\Program Files\\\\Git\\\\bin\\\\git.exe<\/span><\/p>\n<p><span class=\"token comment\"># 2. \u514b\u9686\u9879\u76ee\u5230 Windsurf \u5de5\u4f5c\u533a<\/span><br \/>\ngit clone http:<span class=\"token operator\">\/<\/span><span class=\"token operator\">\/<\/span>localhost:3000\/admin\/project<span class=\"token punctuation\">.<\/span>git<br \/>\ncode <span class=\"token punctuation\">.<\/span> <span class=\"token comment\"># \u4f7f\u7528 Windsurf \u6253\u5f00\u9879\u76ee<\/span><\/p>\n<p><span class=\"token comment\"># 3. \u914d\u7f6e SSH \u5bc6\u94a5&#xff08;\u53ef\u9009&#xff0c;\u63d0\u9ad8\u5b89\u5168\u6027&#xff09;<\/span><br \/>\nssh-keygen <span class=\"token operator\">&#8211;<\/span>t rsa <span class=\"token operator\">&#8211;<\/span>b 4096 <span class=\"token operator\">&#8211;<\/span>C <span class=\"token string\">&#034;your.email&#064;example.com&#034;<\/span><br \/>\n<span class=\"token comment\"># \u5c06\u516c\u94a5\u6dfb\u52a0\u5230 Gitea \u7528\u6237\u8bbe\u7f6e\u4e2d<\/span><\/p>\n<h4>\u56e2\u961f\u534f\u4f5c\u5de5\u4f5c\u6d41<\/h4>\n<p><span class=\"token comment\"># \u5f00\u53d1\u8005\u5de5\u4f5c\u6d41\u793a\u4f8b<\/span><br \/>\n<span class=\"token comment\"># 1. \u514b\u9686\u4ed3\u5e93<\/span><br \/>\ngit clone http:<span class=\"token operator\">\/<\/span><span class=\"token operator\">\/<\/span>localhost:3000\/team\/project<span class=\"token punctuation\">.<\/span>git<br \/>\ncd project<\/p>\n<p><span class=\"token comment\"># 2. \u521b\u5efa\u529f\u80fd\u5206\u652f<\/span><br \/>\ngit checkout <span class=\"token operator\">&#8211;<\/span>b feature\/<span class=\"token function\">new-feature<\/span><\/p>\n<p><span class=\"token comment\"># 3. \u5f00\u53d1\u548c\u63d0\u4ea4<\/span><br \/>\ngit add <span class=\"token punctuation\">.<\/span><br \/>\ngit commit <span class=\"token operator\">&#8211;<\/span>m <span class=\"token string\">&#034;Add new feature&#034;<\/span><\/p>\n<p><span class=\"token comment\"># 4. \u63a8\u9001\u5206\u652f<\/span><br \/>\ngit push origin feature\/<span class=\"token function\">new-feature<\/span><\/p>\n<p><span class=\"token comment\"># 5. \u5728 Gitea Web \u754c\u9762\u521b\u5efa Pull Request<\/span><\/p>\n<h3>&#x1f4ca; \u76d1\u63a7\u4e0e\u7ef4\u62a4<\/h3>\n<h4>\u7cfb\u7edf\u76d1\u63a7\u811a\u672c<\/h4>\n<p><span class=\"token comment\"># \u521b\u5efa Gitea \u5065\u5eb7\u68c0\u67e5\u811a\u672c<\/span><br \/>\n<span class=\"token variable\">$healthCheck<\/span> &#061; &#064;<span class=\"token string\">&#034;<br \/>\n# Gitea \u5065\u5eb7\u68c0\u67e5\u811a\u672c<br \/>\n&#096;<span class=\"token variable\">$giteaUrl<\/span> &#061; &#034;<\/span>http:<span class=\"token operator\">\/<\/span><span class=\"token operator\">\/<\/span>localhost:3000<span class=\"token string\">&#034;<br \/>\n&#096;<span class=\"token variable\">$logFile<\/span> &#061; &#034;<\/span>C:\\\\gitea\\\\log\\\\health-check<span class=\"token punctuation\">.<\/span>log<span class=\"token string\">&#034;<\/p>\n<p>try {<br \/>\n    &#096;<span class=\"token variable\">$response<\/span> &#061; Invoke-WebRequest -Uri &#096;<span class=\"token variable\">$giteaUrl<\/span> -TimeoutSec 10<br \/>\n    if (&#096;<span class=\"token variable\">$response<\/span>.StatusCode -eq 200) {<br \/>\n        &#034;<\/span>&#096;$<span class=\"token punctuation\">(<\/span><span class=\"token function\">Get-Date<\/span><span class=\"token punctuation\">)<\/span>: Gitea is running normally<span class=\"token string\">&#034; | Add-Content &#096;<span class=\"token variable\">$logFile<\/span><br \/>\n    }<br \/>\n} catch {<br \/>\n    &#034;<\/span>&#096;$<span class=\"token punctuation\">(<\/span><span class=\"token function\">Get-Date<\/span><span class=\"token punctuation\">)<\/span>: Gitea health check failed: &#096;$<span class=\"token punctuation\">(<\/span>&#096;<span class=\"token variable\">$_<\/span><span class=\"token punctuation\">.<\/span>Exception<span class=\"token punctuation\">.<\/span>Message<span class=\"token punctuation\">)<\/span><span class=\"token string\">&#034; | Add-Content &#096;<span class=\"token variable\">$logFile<\/span><br \/>\n    # \u53ef\u4ee5\u5728\u8fd9\u91cc\u6dfb\u52a0\u91cd\u542f\u670d\u52a1\u7684\u903b\u8f91<br \/>\n    # Restart-Service -Name Gitea<br \/>\n}<br \/>\n&#034;<\/span>&#064;<\/p>\n<p><span class=\"token variable\">$healthCheck<\/span> <span class=\"token punctuation\">|<\/span> <span class=\"token function\">Out-File<\/span> <span class=\"token string\">&#034;C:\\\\Scripts\\\\gitea-health-check.ps1&#034;<\/span><\/p>\n<p><span class=\"token comment\"># \u521b\u5efa\u5b9a\u65f6\u4efb\u52a1&#xff08;\u6bcf5\u5206\u949f\u68c0\u67e5\u4e00\u6b21&#xff09;<\/span><br \/>\n<span class=\"token variable\">$action<\/span> &#061; <span class=\"token function\">New-ScheduledTaskAction<\/span> <span class=\"token operator\">&#8211;<\/span>Execute <span class=\"token string\">&#039;PowerShell.exe&#039;<\/span> <span class=\"token operator\">&#8211;<\/span>Argument <span class=\"token string\">&#039;-File C:\\\\Scripts\\\\gitea-health-check.ps1&#039;<\/span><br \/>\n<span class=\"token variable\">$trigger<\/span> &#061; <span class=\"token function\">New-ScheduledTaskTrigger<\/span> <span class=\"token operator\">&#8211;<\/span>Once <span class=\"token operator\">&#8211;<\/span>At <span class=\"token punctuation\">(<\/span><span class=\"token function\">Get-Date<\/span><span class=\"token punctuation\">)<\/span> <span class=\"token operator\">&#8211;<\/span>RepetitionInterval <span class=\"token punctuation\">(<\/span><span class=\"token function\">New-TimeSpan<\/span> <span class=\"token operator\">&#8211;<\/span>Minutes 5<span class=\"token punctuation\">)<\/span><br \/>\n<span class=\"token function\">Register-ScheduledTask<\/span> <span class=\"token operator\">&#8211;<\/span>Action <span class=\"token variable\">$action<\/span> <span class=\"token operator\">&#8211;<\/span>Trigger <span class=\"token variable\">$trigger<\/span> <span class=\"token operator\">&#8211;<\/span>TaskName <span class=\"token string\">&#034;Gitea Health Check&#034;<\/span><\/p>\n<h3>&#x1f4dd; \u603b\u7ed3<\/h3>\n<p>\u901a\u8fc7\u672c\u6559\u7a0b&#xff0c;\u6211\u4eec\u6210\u529f\u5728\u963f\u91cc\u4e91 Windows Server \u4e0a\u642d\u5efa\u4e86 Gitea \u79c1\u6709 Git \u670d\u52a1\u5668\u3002\u6574\u4e2a\u8fc7\u7a0b\u4e2d&#xff0c;\u4e91\u670d\u52a1\u5668\u73af\u5883\u5e26\u6765\u4e86\u989d\u5916\u7684\u7f51\u7edc\u914d\u7f6e\u590d\u6742\u6027&#xff0c;\u4f46\u4e5f\u63d0\u4f9b\u4e86\u66f4\u597d\u7684\u6269\u5c55\u6027\u548c\u53ef\u7528\u6027\u3002<\/p>\n<h4>\u2705 \u6210\u529f\u5b8c\u6210\u7684\u914d\u7f6e<\/h4>\n<ul>\n<li>\u963f\u91cc\u4e91\u73af\u5883\u9002\u914d&#xff1a;ECS \u5b9e\u4f8b\u914d\u7f6e\u3001\u5b89\u5168\u7ec4\u89c4\u5219\u3001\u5f39\u6027\u516c\u7f51IP<\/li>\n<li>\u73af\u5883\u9884\u68c0\u67e5&#xff1a;\u7cfb\u7edf\u8981\u6c42\u3001\u6743\u9650\u9a8c\u8bc1\u3001\u7f51\u7edc\u68c0\u6d4b<\/li>\n<li>Gitea \u5b89\u88c5&#xff1a;\u4e8c\u8fdb\u5236\u6587\u4ef6\u4e0b\u8f7d\u3001\u76ee\u5f55\u7ed3\u6784\u521b\u5efa<\/li>\n<li>Web \u914d\u7f6e&#xff1a;\u6570\u636e\u5e93\u8bbe\u7f6e\u3001\u7ba1\u7406\u5458\u8d26\u6237\u521b\u5efa&#xff08;admin\/matqin&#xff09;<\/li>\n<li>\u670d\u52a1\u5316\u90e8\u7f72&#xff1a;Windows \u670d\u52a1\u6ce8\u518c\u3001\u5f00\u673a\u81ea\u542f\u52a8<\/li>\n<li>\u7f51\u7edc\u8bbf\u95ee&#xff1a;\u5185\u5916\u7f51\u914d\u7f6e\u3001\u8de8\u5e73\u53f0\u5ba2\u6237\u7aef\u652f\u6301&#xff08;Windows\/Mac&#xff09;<\/li>\n<li>\u5916\u90e8\u5b58\u50a8&#xff1a;\u591a\u78c1\u76d8\u5b58\u50a8\u65b9\u6848<\/li>\n<li>\u5b89\u5168\u8bbe\u7f6e&#xff1a;\u7981\u7528\u516c\u5f00\u6ce8\u518c\u3001\u9632\u706b\u5899\u914d\u7f6e<\/li>\n<\/ul>\n<h4>\u26a0\ufe0f \u4e3b\u8981\u6311\u6218\u4e0e\u89e3\u51b3<\/h4>\n<li>\u963f\u91cc\u4e91\u5b89\u5168\u7ec4\u914d\u7f6e&#xff1a;\u7aef\u53e3\u5f00\u653e\u3001\u7f51\u7edc\u8bbf\u95ee\u7b56\u7565\u914d\u7f6e<\/li>\n<li>Git \u73af\u5883\u53d8\u91cf\u95ee\u9898&#xff1a;PATH \u914d\u7f6e\u590d\u6742&#xff0c;\u9700\u8981\u7cfb\u7edf\u7ea7\u6301\u4e45\u5316\u8bbe\u7f6e&#xff0c;\u907f\u514d\u4f1a\u8bdd\u4e22\u5931<\/li>\n<li>\u4ed3\u5e93\u521b\u5efa\u5faa\u73af&#xff1a;API \u521b\u5efa\u5931\u8d25\u540e\u9700\u8981\u624b\u52a8 Web \u754c\u9762\u521b\u5efa&#xff0c;\u907f\u514d\u63a8\u9001\u5230\u4e0d\u5b58\u5728\u7684\u4ed3\u5e93<\/li>\n<li>\u4e91\u670d\u52a1\u5668\u7f51\u7edc\u8bbf\u95ee&#xff1a;HTTP_ADDR \u914d\u7f6e\u3001\u9632\u706b\u5899\u89c4\u5219\u3001\u5b89\u5168\u7ec4\u5f00\u653e<\/li>\n<li>\u6743\u9650\u6a21\u578b\u590d\u6742&#xff1a;UAC\u3001\u6587\u4ef6\u6743\u9650\u3001\u670d\u52a1\u6743\u9650\u591a\u5c42\u6743\u9650\u7ba1\u7406<\/li>\n<li>\u670d\u52a1\u542f\u52a8\u5931\u8d25&#xff1a;Gitea \u627e\u4e0d\u5230 Git&#xff0c;\u9700\u8981\u6b63\u786e\u914d\u7f6e\u670d\u52a1\u73af\u5883\u53d8\u91cf<\/li>\n<li>\u8de8\u5e73\u53f0\u517c\u5bb9\u6027&#xff1a;Windows PC \u548c Mac \u5ba2\u6237\u7aef\u7684\u7edf\u4e00\u8bbf\u95ee\u914d\u7f6e<\/li>\n<h4>&#x1f4a1; \u963f\u91cc\u4e91\u90e8\u7f72\u6700\u4f73\u5b9e\u8df5<\/h4>\n<li>\u5b89\u5168\u7ec4\u7b56\u7565&#xff1a;\u7cbe\u786e\u63a7\u5236\u7aef\u53e3\u5f00\u653e&#xff0c;\u907f\u514d\u66b4\u9732\u4e0d\u5fc5\u8981\u7684\u7aef\u53e3<\/li>\n<li>\u7f51\u7edc\u914d\u7f6e&#xff1a;\u4f7f\u7528\u5f39\u6027\u516c\u7f51IP&#xff0c;\u914d\u7f6e\u5408\u9002\u7684\u5e26\u5bbd<\/li>\n<li>\u6570\u636e\u5907\u4efd&#xff1a;\u5229\u7528\u963f\u91cc\u4e91\u5feb\u7167\u529f\u80fd\u5b9a\u671f\u5907\u4efd\u7cfb\u7edf\u548c\u6570\u636e<\/li>\n<li>\u76d1\u63a7\u544a\u8b66&#xff1a;\u914d\u7f6e\u4e91\u76d1\u63a7&#xff0c;\u53ca\u65f6\u53d1\u73b0\u670d\u52a1\u5f02\u5e38<\/li>\n<li>SSL \u8bc1\u4e66&#xff1a;\u751f\u4ea7\u73af\u5883\u5efa\u8bae\u914d\u7f6e HTTPS \u52a0\u5bc6\u8bbf\u95ee<\/li>\n<h4>&#x1f310; \u5b9e\u9645\u90e8\u7f72\u6210\u679c<\/h4>\n<ul>\n<li>\u670d\u52a1\u5668\u5730\u5740&#xff1a;http:\/\/your-server-ip:3000&#xff08;\u8bf7\u66ff\u6362\u4e3a\u60a8\u7684\u5b9e\u9645IP&#xff09;<\/li>\n<li>\u7ba1\u7406\u529f\u80fd&#xff1a;\u5b8c\u6574\u7684 Web \u7ba1\u7406\u754c\u9762<\/li>\n<li>\u7528\u6237\u7cfb\u7edf&#xff1a;\u652f\u6301\u591a\u7528\u6237\u3001\u6743\u9650\u7ba1\u7406<\/li>\n<li>\u4ed3\u5e93\u7ba1\u7406&#xff1a;\u652f\u6301\u521b\u5efa\u3001\u514b\u9686\u3001\u63a8\u9001\u7b49\u5b8c\u6574 Git \u64cd\u4f5c<\/li>\n<li>\u5ba2\u6237\u7aef\u652f\u6301&#xff1a;Windows PC\u3001Mac \u5747\u53ef\u6b63\u5e38\u8bbf\u95ee<\/li>\n<\/ul>\n<p>&#x1f512; \u5b89\u5168\u63d0\u9192&#xff1a;<\/p>\n<ul>\n<li>\u8bf7\u52a1\u5fc5\u4fee\u6539\u9ed8\u8ba4\u5bc6\u7801\u4e3a\u590d\u6742\u5bc6\u7801<\/li>\n<li>\u5b9a\u671f\u66f4\u65b0\u7cfb\u7edf\u548c Gitea \u7248\u672c<\/li>\n<li>\u914d\u7f6e\u9002\u5f53\u7684\u9632\u706b\u5899\u89c4\u5219<\/li>\n<li>\u8003\u8651\u914d\u7f6e HTTPS \u52a0\u5bc6\u8bbf\u95ee<\/li>\n<li>\u5b9a\u671f\u5907\u4efd\u91cd\u8981\u6570\u636e<\/li>\n<\/ul>\n<h4>&#x1f52e; \u6269\u5c55\u53ef\u80fd\u6027<\/h4>\n<ul>\n<li>\u57df\u540d\u7ed1\u5b9a&#xff1a;\u7ed1\u5b9a\u81ea\u5b9a\u4e49\u57df\u540d&#xff0c;\u63d0\u5347\u4e13\u4e1a\u5ea6<\/li>\n<li>HTTPS \u914d\u7f6e&#xff1a;SSL \u8bc1\u4e66\u914d\u7f6e&#xff0c;\u63d0\u5347\u5b89\u5168\u6027<\/li>\n<li>CDN \u52a0\u901f&#xff1a;\u914d\u7f6e\u963f\u91cc\u4e91 CDN&#xff0c;\u63d0\u5347\u5168\u7403\u8bbf\u95ee\u901f\u5ea6<\/li>\n<li>\u5bb9\u5668\u5316\u5347\u7ea7&#xff1a;\u8fc1\u79fb\u5230\u963f\u91cc\u4e91\u5bb9\u5668\u670d\u52a1 ACK<\/li>\n<li>\u4f01\u4e1a\u96c6\u6210&#xff1a;\u4e0e\u9489\u9489\u3001\u4f01\u4e1a\u5fae\u4fe1\u7b49\u529e\u516c\u5e73\u53f0\u96c6\u6210<\/li>\n<li>CI\/CD \u6d41\u6c34\u7ebf&#xff1a;\u7ed3\u5408\u963f\u91cc\u4e91 DevOps \u5de5\u5177\u94fe<\/li>\n<\/ul>\n<p>\u901a\u8fc7\u7cfb\u7edf\u6027\u7684\u73af\u5883\u9884\u68c0\u67e5\u3001\u7ed3\u6784\u5316\u7684\u5b89\u88c5\u6d41\u7a0b\u548c\u5b8c\u5584\u7684\u4e91\u670d\u52a1\u5668\u914d\u7f6e&#xff0c;\u6211\u4eec\u5728\u963f\u91cc\u4e91 Windows Server \u4e0a\u5efa\u7acb\u4e86\u4e00\u4e2a\u7a33\u5b9a\u53ef\u9760\u7684 Gitea \u79c1\u6709 Git \u670d\u52a1\u5668\u3002\u8fd9\u5957\u65b9\u6848\u4e0d\u4ec5\u9002\u7528\u4e8e\u4e2a\u4eba\u5f00\u53d1\u8005&#xff0c;\u4e5f\u5b8c\u5168\u53ef\u4ee5\u6ee1\u8db3\u5c0f\u578b\u56e2\u961f\u548c\u4f01\u4e1a\u7684\u4ee3\u7801\u7ba1\u7406\u9700\u6c42&#xff0c;\u5e76\u4e14\u5177\u5907\u4e86\u4e91\u5e73\u53f0\u7684\u6269\u5c55\u6027\u548c\u9ad8\u53ef\u7528\u6027\u4f18\u52bf\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Windows \u7cfb\u7edf\u642d\u5efa Gitea \u79c1\u6709 Git \u670d\u52a1\u5668\u5b8c\u6574\u6559\u7a0b\u672c\u6587\u8be6\u7ec6\u4ecb\u7ecd\u5982\u4f55\u5728 Windows \u7cfb\u7edf\u4e0a\u642d\u5efa Gitea \u79c1\u6709 Git \u670d\u52a1\u5668&#xff0c;\u5305\u542b\u5b8c\u6574\u7684\u73af\u5883\u914d\u7f6e\u3001\u5b89\u88c5\u6b65\u9aa4\u3001\u5e38\u89c1\u95ee\u9898\u89e3\u51b3\u65b9\u6848&#xff0c;\u9002\u5408\u4e2a\u4eba\u5f00\u53d1\u8005\u548c\u5c0f\u56e2\u961f\u4f7f\u7528\u3002&#x1f4dd; \u524d\u8a00<br \/>\n\u5728\u65e5\u5e38\u5f00\u53d1\u4e2d&#xff0c;\u642d\u5efa\u79c1\u6709 Git \u670d\u52a1\u5668\u662f\u8bb8\u591a\u5f00\u53d1\u8005\u548c\u56e2\u961f\u7684\u9700\u6c42\u3002\u76f8\u6bd4\u4e8e GitLab \u7684\u590d\u6742\u914d\u7f6e&#xff0c;Gitea \u662f\u4e00\u4e2a\u8f7b\u91cf\u7ea7\u7684 Git \u670d\u52a1\u89e3\u51b3\u65b9\u6848\u3002\u672c\u6587\u5c06\u8be6\u7ec6\u4ecb\u7ecd\u5728\u963f\u91cc\u4e91 W<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[149,43,96],"topic":[],"class_list":["post-72589","post","type-post","status-publish","format-standard","hentry","category-server","tag-windows","tag-43","tag-96"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v20.3 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>\u963f\u91cc\u4e91 Windows \u670d\u52a1\u5668 \u642d\u5efa Gitea \u79c1\u6709 Git \u670d\u52a1\u5668\u5b8c\u6574\u6559\u7a0b - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.wsisp.com\/helps\/72589.html\" \/>\n<meta property=\"og:locale\" content=\"zh_CN\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"\u963f\u91cc\u4e91 Windows \u670d\u52a1\u5668 \u642d\u5efa Gitea \u79c1\u6709 Git \u670d\u52a1\u5668\u5b8c\u6574\u6559\u7a0b - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\" \/>\n<meta property=\"og:description\" content=\"Windows \u7cfb\u7edf\u642d\u5efa Gitea \u79c1\u6709 Git \u670d\u52a1\u5668\u5b8c\u6574\u6559\u7a0b\u672c\u6587\u8be6\u7ec6\u4ecb\u7ecd\u5982\u4f55\u5728 Windows \u7cfb\u7edf\u4e0a\u642d\u5efa Gitea \u79c1\u6709 Git \u670d\u52a1\u5668&#xff0c;\u5305\u542b\u5b8c\u6574\u7684\u73af\u5883\u914d\u7f6e\u3001\u5b89\u88c5\u6b65\u9aa4\u3001\u5e38\u89c1\u95ee\u9898\u89e3\u51b3\u65b9\u6848&#xff0c;\u9002\u5408\u4e2a\u4eba\u5f00\u53d1\u8005\u548c\u5c0f\u56e2\u961f\u4f7f\u7528\u3002&#x1f4dd; \u524d\u8a00 \u5728\u65e5\u5e38\u5f00\u53d1\u4e2d&#xff0c;\u642d\u5efa\u79c1\u6709 Git \u670d\u52a1\u5668\u662f\u8bb8\u591a\u5f00\u53d1\u8005\u548c\u56e2\u961f\u7684\u9700\u6c42\u3002\u76f8\u6bd4\u4e8e GitLab \u7684\u590d\u6742\u914d\u7f6e&#xff0c;Gitea \u662f\u4e00\u4e2a\u8f7b\u91cf\u7ea7\u7684 Git \u670d\u52a1\u89e3\u51b3\u65b9\u6848\u3002\u672c\u6587\u5c06\u8be6\u7ec6\u4ecb\u7ecd\u5728\u963f\u91cc\u4e91 W\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.wsisp.com\/helps\/72589.html\" \/>\n<meta property=\"og:site_name\" content=\"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\" \/>\n<meta property=\"article:published_time\" content=\"2026-02-05T22:48:48+00:00\" \/>\n<meta name=\"author\" content=\"admin\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"\u4f5c\u8005\" \/>\n\t<meta name=\"twitter:data1\" content=\"admin\" \/>\n\t<meta name=\"twitter:label2\" content=\"\u9884\u8ba1\u9605\u8bfb\u65f6\u95f4\" \/>\n\t<meta name=\"twitter:data2\" content=\"10 \u5206\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/72589.html\",\"url\":\"https:\/\/www.wsisp.com\/helps\/72589.html\",\"name\":\"\u963f\u91cc\u4e91 Windows \u670d\u52a1\u5668 \u642d\u5efa Gitea \u79c1\u6709 Git \u670d\u52a1\u5668\u5b8c\u6574\u6559\u7a0b - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\",\"isPartOf\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/#website\"},\"datePublished\":\"2026-02-05T22:48:48+00:00\",\"dateModified\":\"2026-02-05T22:48:48+00:00\",\"author\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41\"},\"breadcrumb\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/72589.html#breadcrumb\"},\"inLanguage\":\"zh-Hans\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.wsisp.com\/helps\/72589.html\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/72589.html#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"\u9996\u9875\",\"item\":\"https:\/\/www.wsisp.com\/helps\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"\u963f\u91cc\u4e91 Windows \u670d\u52a1\u5668 \u642d\u5efa Gitea \u79c1\u6709 Git \u670d\u52a1\u5668\u5b8c\u6574\u6559\u7a0b\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/#website\",\"url\":\"https:\/\/www.wsisp.com\/helps\/\",\"name\":\"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\",\"description\":\"\u9999\u6e2f\u670d\u52a1\u5668_\u9999\u6e2f\u4e91\u670d\u52a1\u5668\u8d44\u8baf_\u670d\u52a1\u5668\u5e2e\u52a9\u6587\u6863_\u670d\u52a1\u5668\u6559\u7a0b\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.wsisp.com\/helps\/?s={search_term_string}\"},\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"zh-Hans\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41\",\"name\":\"admin\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"zh-Hans\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery\",\"contentUrl\":\"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery\",\"caption\":\"admin\"},\"sameAs\":[\"http:\/\/wp.wsisp.com\"],\"url\":\"https:\/\/www.wsisp.com\/helps\/author\/admin\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"\u963f\u91cc\u4e91 Windows \u670d\u52a1\u5668 \u642d\u5efa Gitea \u79c1\u6709 Git \u670d\u52a1\u5668\u5b8c\u6574\u6559\u7a0b - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.wsisp.com\/helps\/72589.html","og_locale":"zh_CN","og_type":"article","og_title":"\u963f\u91cc\u4e91 Windows \u670d\u52a1\u5668 \u642d\u5efa Gitea \u79c1\u6709 Git \u670d\u52a1\u5668\u5b8c\u6574\u6559\u7a0b - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","og_description":"Windows \u7cfb\u7edf\u642d\u5efa Gitea \u79c1\u6709 Git \u670d\u52a1\u5668\u5b8c\u6574\u6559\u7a0b\u672c\u6587\u8be6\u7ec6\u4ecb\u7ecd\u5982\u4f55\u5728 Windows \u7cfb\u7edf\u4e0a\u642d\u5efa Gitea \u79c1\u6709 Git \u670d\u52a1\u5668&#xff0c;\u5305\u542b\u5b8c\u6574\u7684\u73af\u5883\u914d\u7f6e\u3001\u5b89\u88c5\u6b65\u9aa4\u3001\u5e38\u89c1\u95ee\u9898\u89e3\u51b3\u65b9\u6848&#xff0c;\u9002\u5408\u4e2a\u4eba\u5f00\u53d1\u8005\u548c\u5c0f\u56e2\u961f\u4f7f\u7528\u3002&#x1f4dd; \u524d\u8a00 \u5728\u65e5\u5e38\u5f00\u53d1\u4e2d&#xff0c;\u642d\u5efa\u79c1\u6709 Git \u670d\u52a1\u5668\u662f\u8bb8\u591a\u5f00\u53d1\u8005\u548c\u56e2\u961f\u7684\u9700\u6c42\u3002\u76f8\u6bd4\u4e8e GitLab \u7684\u590d\u6742\u914d\u7f6e&#xff0c;Gitea \u662f\u4e00\u4e2a\u8f7b\u91cf\u7ea7\u7684 Git \u670d\u52a1\u89e3\u51b3\u65b9\u6848\u3002\u672c\u6587\u5c06\u8be6\u7ec6\u4ecb\u7ecd\u5728\u963f\u91cc\u4e91 W","og_url":"https:\/\/www.wsisp.com\/helps\/72589.html","og_site_name":"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","article_published_time":"2026-02-05T22:48:48+00:00","author":"admin","twitter_card":"summary_large_image","twitter_misc":{"\u4f5c\u8005":"admin","\u9884\u8ba1\u9605\u8bfb\u65f6\u95f4":"10 \u5206"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/www.wsisp.com\/helps\/72589.html","url":"https:\/\/www.wsisp.com\/helps\/72589.html","name":"\u963f\u91cc\u4e91 Windows \u670d\u52a1\u5668 \u642d\u5efa Gitea \u79c1\u6709 Git \u670d\u52a1\u5668\u5b8c\u6574\u6559\u7a0b - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","isPartOf":{"@id":"https:\/\/www.wsisp.com\/helps\/#website"},"datePublished":"2026-02-05T22:48:48+00:00","dateModified":"2026-02-05T22:48:48+00:00","author":{"@id":"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41"},"breadcrumb":{"@id":"https:\/\/www.wsisp.com\/helps\/72589.html#breadcrumb"},"inLanguage":"zh-Hans","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.wsisp.com\/helps\/72589.html"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.wsisp.com\/helps\/72589.html#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"\u9996\u9875","item":"https:\/\/www.wsisp.com\/helps"},{"@type":"ListItem","position":2,"name":"\u963f\u91cc\u4e91 Windows \u670d\u52a1\u5668 \u642d\u5efa Gitea \u79c1\u6709 Git \u670d\u52a1\u5668\u5b8c\u6574\u6559\u7a0b"}]},{"@type":"WebSite","@id":"https:\/\/www.wsisp.com\/helps\/#website","url":"https:\/\/www.wsisp.com\/helps\/","name":"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","description":"\u9999\u6e2f\u670d\u52a1\u5668_\u9999\u6e2f\u4e91\u670d\u52a1\u5668\u8d44\u8baf_\u670d\u52a1\u5668\u5e2e\u52a9\u6587\u6863_\u670d\u52a1\u5668\u6559\u7a0b","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.wsisp.com\/helps\/?s={search_term_string}"},"query-input":"required name=search_term_string"}],"inLanguage":"zh-Hans"},{"@type":"Person","@id":"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41","name":"admin","image":{"@type":"ImageObject","inLanguage":"zh-Hans","@id":"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/image\/","url":"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery","contentUrl":"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery","caption":"admin"},"sameAs":["http:\/\/wp.wsisp.com"],"url":"https:\/\/www.wsisp.com\/helps\/author\/admin"}]}},"_links":{"self":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/posts\/72589","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/comments?post=72589"}],"version-history":[{"count":0,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/posts\/72589\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/media?parent=72589"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/categories?post=72589"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/tags?post=72589"},{"taxonomy":"topic","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/topic?post=72589"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}