提交 af5e1730 authored 作者: Administrator's avatar Administrator

Initial commit

上级
### 生成 SSH KEY
使用 ssh-keygen 工具生成,位置在 Git 安装目录下,我的是 `C:\Program Files\Git\usr\bin`
输入命令:
```
ssh-keygen -t rsa -C "512889371@qq.com"
```
执行成功后的效果:
```
Generating public/private rsa key pair.
Enter file in which to save the key (/c/Users/nick/.ssh/id_rsa):
/c/Users/nick/.ssh/id_rsa already exists.
Overwrite (y/n)? y
Enter passphrase (empty for no passphrase):
Enter same passphrase again:
Your identification has been saved in /c/Users/nick/.ssh/id_rsa.
Your public key has been saved in /c/Users/nick/.ssh/id_rsa.pub.
The key fingerprint is:
SHA256:D4iujDj1OSzQD1wnIR8awwvQPyPwp1EfOpLB+yts2SM 512889371@qq.com
The key's randomart image is:
+---[RSA 3072]----+
|o+ |
|o O + . |
| + & = . |
| X @.o. |
| o O.*. S |
|. *.. o |
| + B.o . |
|ooE.X |
|ooo+ o |
+----[SHA256]-----+
```
### 复制 SSH-KEY 信息到 GitHub
秘钥位置在:C:\Users\你的用户名\.ssh 目录下,找到 id_rsa.pub 并使用编辑器打开并拷贝
```
命令行指令
Git 全局设置
git config --global user.name "mm"
git config --global user.email "nn@qq.com"
创建新版本库
git clone ssh://git@39.100.254.140:12222/loit-Infrastructure-doc/loit-initproject-doc.git
cd loit-initproject-doc
touch README.md
git add README.md
git commit -m "add README"
git push -u origin master
已存在的文件夹
cd existing_folder
git init
git remote add origin ssh://git@39.100.254.140:12222/loit-Infrastructure-doc/loit-initproject-doc.git
git add .
git commit -m "Initial commit"
git push -u origin master
已存在的 Git 版本库
cd existing_repo
git remote rename origin old-origin
git remote add origin ssh://git@39.100.254.140:12222/loit-Infrastructure-doc/loit-initproject-doc.git
git push -u origin --all
git push -u origin --tags
```
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论