Skip to content
Navigation Menu
Sign in
Products
Platform
GitHub
Repository hosting, code review, and collaboration
Copilot
AI coding agent for tasks, projects and automated work
Build & Ship
Actions
CI/CD and automation
Code Quality
Quality analysis, fixes, and enforcement
Codespaces
Cloud development environments
Secure
Code Security
Vulnerability detection and remediation
Secret Protection
Secret scanning and leak prevention
All Features
Developers
Learn
Documentation
Training
Certifications
Build
Build with Copilot
Customize Copilot
Integrations
Explore
Trending repos
GitHub Sponsors
Events
Changelog
Changelog
Your source for the latest features, improvements, and fixes across GitHub products, all in one place.
Businesses
By Stage
Enterprises
Team
Startups
Nonprofits
By Industry
Healthcare
Financial services
Manufacturing
Government
See all industries
Evaluate GitHub
Why GitHub
Customer Stories
Business insights
Trust Center
Add-ons
GitHub Advanced Security
Enterprise-grade code security
Copilot for business
Enterprise-grade AI features
Premium Support
Enterprise-grade 24/7 support
Resources
Learn & Connect
Documentation
Resource center
Blog
Events & webinars
Community Forum
Customer Stories
Integrations
Support
Customer support
Training
GitHub Status
Company
About
Partners
Changelog
GitHub Universe
GitHub Universe
The event for developers, by developers — talks, workshops, and what’s next for GitHub.
Pricing
Search
/
Sign in
Sign up
Appearance settings
You signed in with another tab or window.
Reload
to refresh your session.
You signed out in another tab or window.
Reload
to refresh your session.
You switched accounts on another tab or window.
Reload
to refresh your session.
Dismiss alert
{{ message }}
Zipdata1
leak-check
Repository navigation
Code
Pull requests
Actions
Projects
Security and quality
Insights
More
items
Files
Expand file tree
main
Breadcrumbs
leak-check
/
install.sh
Copy path
Blame
More file actions
Blame
More file actions
Latest commit
History
History
History
66 lines (56 loc) · 1.58 KB
main
Breadcrumbs
leak-check
/
install.sh
Copy path
Top
File metadata and controls
Code
Blame
66 lines (56 loc) · 1.58 KB
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
#!/bin/bash
set -e # 遇到错误立即退出
# 临时把 ~/.local/bin 加入 PATH
export PATH="/usr/local/bin:/usr/bin:/bin:$HOME/.local/bin:$PATH"
echo "=== 检查系统依赖 ==="
# 检查 Git
if ! command -v git &>/dev/null; then
echo "Git 未安装,正在安装..."
sudo apt update
sudo apt install -y git
else
echo "Git 已安装,跳过"
fi
# 检查 curl
if ! command -v curl &>/dev/null; then
echo "curl 未安装,正在安装..."
sudo apt update
sudo apt install -y curl
else
echo "curl 已安装,跳过"
fi
echo "=== 安装 uv ==="
if ! command -v uv &>/dev/null; then
echo "正在安装 uv..."
curl -LsSf https://astral.sh/uv/install.sh | sh
echo "uv 安装完成,请确保 ~/.local/bin 在 PATH 中"
else
echo "uv 已安装,跳过"
fi
echo "=== 克隆或更新项目 ==="
if [ -d "leak-check" ]; then
cd leak-check || exit
if [ -d ".git" ]; then
echo "已存在 git 仓库,尝试更新..."
git pull
else
echo "目录 leak-check 已存在,但不是 git 仓库,请手动处理"
exit 1
fi
else
git clone https://github.com/garinasset/leak-check.git
cd leak-check || exit
fi
echo "=== 安装 Python 3.14 ==="
uv python install 3.14
echo "Python 版本检查:"
uv python list
echo "=== 创建虚拟环境 ==="
uv venv
echo "=== 安装依赖(使用锁文件) ==="
uv sync --frozen
echo "=== 安装完成 ==="
echo "虚拟环境已创建,依赖已安装"
echo "启动 API 的命令示例:"
echo "cd leak-check/"
echo "uv run uvicorn main:app --host 0.0.0.0 --port 8000"
You can’t perform that action at this time.