栏目分类:
子分类:
返回
名师互学网用户登录
快速导航关闭
当前搜索
当前分类
子分类
实用工具
热门搜索
名师互学网 > IT > 系统运维 > 运维 > Linux

gitlab-git配置

Linux 更新时间: 发布时间: IT归档 最新发布 模块sitemap 名妆网 法律咨询 聚返吧 英语巴士网 伯小乐 网商动力

gitlab-git配置

gitlab 1、windows本机生成ssh keys
C:Usersmax>ssh-keygen -t rsa -C  'max@qq.com'
Generating public/private rsa key pair.
Enter file in which to save the key (C:Usersmax/.ssh/id_rsa):
Enter passphrase (empty for no passphrase):
Enter same passphrase again:
Your identification has been saved in C:Usersmax/.ssh/id_rsa.
Your public key has been saved in C:Usersmax/.ssh/id_rsa.pub.
The key fingerprint is:
SHA256:wYo8p7gqrYzJhkkCsvS6JT38iy/JVZM1USMo7AgZ3MA 'max@qq.com'
The key's randomart image is:
+---[RSA 3072]----+
|oo= .   .ooo     |
| E . o o o. .    |
|  . o . = .      |
|o. o o = .       |
|+.. + + S        |
|o.oo =           |
|+++=+            |
|B++=+            |
|B*o.o+.          |
+----[SHA256]-----+
C:Usersmax.ssh>dir
 Volume in drive C is 新加卷
 Volume Serial Number is D038-23B6

 Directory of C:Usersmax.ssh

2022-04-12  下午 05:00              .
2022-04-12  下午 05:00              ..
2022-04-12  下午 04:51             2,610 id_rsa
2022-04-12  下午 04:51             1,675 id_rsa.pub
2022-04-12  下午 04:51               382 id_rsa.pub.pub
2022-04-12  下午 04:46               174 known_hosts
               4 File(s)          4,841 bytes
               2 Dir(s)  207,080,300,544 bytes free
2、gitlab设置ssh keys

gitlab——-user settings ——SSH Keys

将id_rsa.pub 内容粘贴到 key里,Title 随意命名。

ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQCdZqaRajdbW0yJj3B6/y5brqivcQNdaIFj91q8uBJuFjOBEgpnShsyrfBsvmG/70Y/7hYKfZriTeKE/ClteCxLBE3svvh7OBPVEYRcmWAJnXRqXcx6xfj6TRHpXRXEcbllN5FjH9KEN824is3bRhnDBLJLEIdIWLe7n3/EZH/hkk/SuVm6xWOL5b7hUC2in9Yi+C0ah/eZuIPtGdzx5zpUBysOVqvHua5JDp2s5ULXfKlEU78ExDnxEkzY378sJwsAPdpYC//n+54lFnk2WcHY4KkCnnl76QAsIHLxws7rJzSP2rixrM3ZhN6Y5GrrDr0EqWaJRdAlssMIOhjzvUjB
3、gitlab git命令 Command line instructions Git global setup
git config --global user.name "max"
git config --global user.email "max@qq.com"

Create a new repository
git clone git@ip:max/apache-tomcat-z.git
cd rsxtest
touch README.md
git add README.md
git commit -m "add README"
git push -u origin master
Existing folder
cd existing_folder
git init
git remote add origin git@ip:max/apache-tomcat-.git
git add .
git commit -m "Initial commit"
git push -u origin master

Existing Git repository
cd existing_repo
git remote rename origin old-origin
git remote add origin git@ip:max/apache-tomcat-z.git
git push -u origin --all
git push -u origin --tags
转载请注明:文章转载自 www.mshxw.com
本文地址:https://www.mshxw.com/it/964457.html
我们一直用心在做
关于我们 文章归档 网站地图 联系我们

版权所有 (c)2021-2022 MSHXW.COM

ICP备案号:晋ICP备2021003244-6号