新文件: "AI\346\212\200\346\234\257/.env"
新文件: "AI\346\212\200\346\234\257/docker-compose.yml" 修改: "GIT\346\212\200\346\234\257.md" 删除: README.md
This commit is contained in:
@@ -0,0 +1,6 @@
|
||||
HERMES_API_KEY=your_actual_api_key_here
|
||||
|
||||
|
||||
TELEGRAM_ALLOWED_USERS=your_telegram_user_id
|
||||
DISCORD_ALLOWED_USERS=your_discord_user_id
|
||||
# 其他平台类似
|
||||
@@ -0,0 +1,63 @@
|
||||
services:
|
||||
hermes:
|
||||
image: nousresearch/hermes-agent:latest
|
||||
container_name: hermes
|
||||
restart: unless-stopped
|
||||
command: gateway run
|
||||
ports:
|
||||
- "8642:8642"
|
||||
volumes:
|
||||
- ${HOME}/.hermes:/opt/data
|
||||
networks:
|
||||
- hermes-net
|
||||
environment:
|
||||
- API_SERVER_ENABLED=true
|
||||
- API_SERVER_HOST=0.0.0.0
|
||||
- API_SERVER_KEY=${HERMES_API_KEY}
|
||||
- TZ=Asia/Shanghai
|
||||
cap_add:
|
||||
- SYS_ADMIN
|
||||
- NET_ADMIN
|
||||
- DAC_OVERRIDE
|
||||
- SYS_PTRACE
|
||||
healthcheck:
|
||||
test: ["CMD", "curl", "-f", "http://localhost:8642/health"]
|
||||
interval: 30s
|
||||
timeout: 10s
|
||||
retries: 3
|
||||
start_period: 40s
|
||||
deploy:
|
||||
resources:
|
||||
limits:
|
||||
cpus: '2.0'
|
||||
memory: 4G
|
||||
|
||||
dashboard:
|
||||
image: nousresearch/hermes-agent:latest
|
||||
container_name: hermes-dashboard
|
||||
restart: unless-stopped
|
||||
command: dashboard --host 0.0.0.0 --insecure
|
||||
ports:
|
||||
- "9119:9119"
|
||||
volumes:
|
||||
- ${HOME}/.hermes:/opt/data
|
||||
networks:
|
||||
- hermes-net
|
||||
environment:
|
||||
- GATEWAY_HEALTH_URL=http://hermes:8642
|
||||
- HERMES_DASHBOARD_HOST=0.0.0.0
|
||||
- HERMES_DASHBOARD_PORT=9119
|
||||
- TZ=Asia/Shanghai
|
||||
depends_on:
|
||||
hermes:
|
||||
condition: service_healthy
|
||||
deploy:
|
||||
resources:
|
||||
limits:
|
||||
cpus: '0.5'
|
||||
memory: 512M
|
||||
|
||||
networks:
|
||||
hermes-net:
|
||||
driver: bridge
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
# GIT 功能应用
|
||||
|
||||
|
||||
公司 http://117.78.60.236:8000/users/sign_in zhanghonggang@csbr.cn w~7!
|
||||
|
||||
|
||||
|
||||
@@ -15,7 +15,7 @@ sudo apt install gitk git-cola 图形化工具
|
||||
全局设置
|
||||
git config --global user.email "zimyx@.com"
|
||||
git config --global user.name "Your Name"
|
||||
|
||||
git config --global credential.helper store 全局级别保存凭据,免密
|
||||
|
||||
```
|
||||
|
||||
@@ -25,9 +25,50 @@ git config --global user.name "Your Name"
|
||||
|
||||
|
||||
|
||||
### SSH 免密推送配置(你提供的步骤非常重要)
|
||||
|
||||
配置 SSH 密钥后,可以避免每次推送代码时输入密码:
|
||||
|
||||
#### 1. 生成 SSH 密钥对
|
||||
|
||||
```
|
||||
ssh-keygen -t rsa -C "your_email@example.com" 也可用用户名
|
||||
```
|
||||
|
||||
按提示完成三次回车即可生成密钥。查看公钥内容:
|
||||
|
||||
```
|
||||
cat ~/.ssh/id_rsa.pub
|
||||
```
|
||||
|
||||
#### 2. 在 Gitea 中添加 SSH 公钥
|
||||
|
||||
登录 Gitea Web 界面 → 点击右上角头像 → 设置 → SSH/GPG 密钥 → 添加密钥 → 粘贴公钥内容并保存。
|
||||
|
||||
#### 3. 修改远程仓库地址为 SSH 格式
|
||||
|
||||
```
|
||||
# 查看当前远程地址
|
||||
git remote -v
|
||||
|
||||
# 修改为 SSH 地址
|
||||
git remote set-url origin git@gitea.example.com:username/repo.git
|
||||
```
|
||||
|
||||
#### 4. 测试 SSH 连接
|
||||
|
||||
```
|
||||
在服务器上创建 zimy 用户并设置密码:
|
||||
sudo useradd -m -s /bin/bash zimy
|
||||
sudo passwd zimy 设置密码
|
||||
|
||||
|
||||
ssh -T zimy@zgene.cn
|
||||
```
|
||||
|
||||
首次连接会提示信任主机,输入 `yes` 确认。认证成功后会显示欢迎信息。
|
||||
|
||||
|
||||
公司 http://117.78.60.236:8000/users/sign_in zhanghonggang@csbr.cn w~7!
|
||||
|
||||
## 分支管理规范
|
||||
|
||||
|
||||
Reference in New Issue
Block a user