code-paper / GITHUB_SETUP.md
Tinghong-Ye22's picture
Add files using upload-large-folder tool
c3099b3 verified
|
Raw History Blame Contribute Delete
1.17 kB
# GitHub 备份绑定说明
目标仓库:`git@github.com:yediong/seg-trajectory-g1.git`
## 当前本地绑定
- Git 配置使用仓库级 `core.sshCommand`,只对当前仓库生效。
- 私钥位置:`.git/ssh/github_deploy_ed25519`(不纳入 Git,权限为 600)。
- 公钥位置:`.git/ssh/github_deploy_ed25519.pub`。
- 指纹:`SHA256:BVL89ClEFrTWCOYb99VXch7juJY39lItyIQEjL8GmnM`。
- 当前公钥文本:
```text
ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIEY1HWaYj0L+PLS/tstYMez78sqg6fWC2bE9zpryCiWM repo: yediong/seg-trajectory-g1 (local deploy key)
```
## 只给这个仓库开写权限
在 GitHub 仓库页面打开 `Settings → Deploy keys → Add deploy key`,粘贴上面的公钥,并勾选 `Allow write access`。Deploy Key 是仓库级权限,不会让这把 key 访问其它仓库。
添加后,在项目根目录验证:
```bash
git ls-remote origin
git push -u origin v1-initial
git push -u origin main
```
不要把 `.git/ssh/github_deploy_ed25519`(无 `.pub` 后缀的私钥)复制到 GitHub、聊天记录或版本库。若更换机器,需要重新生成仓库级 key,并在 GitHub 的这个仓库重新添加公钥。