linux 创建git项目并提交到gitee(保姆式教程)

news/2024/5/17 15:35:13 标签: linux, git, gitee

git_0">01、git安装与初始化设置

mhzzj@mhzzj-virtual-machine:~/work/skynetStudy$ apt install 
mhzzj@mhzzj-virtual-machine:~/work/skynetStudy$ git config --global user.name "用户名"
mhzzj@mhzzj-virtual-machine:~/work/skynetStudy$ git config --global user.email 10086@qq.com

02、生成密钥并拷贝

生成密钥

mhzzj@mhzzj-virtual-machine:~/work/skynetStudy$ ssh-keygen -t rsa -C "your email"
Generating public/private rsa key pair.
Enter file in which to save the key (/home/mhzzj/.ssh/id_rsa): 
Created directory '/home/mhzzj/.ssh'.
Enter passphrase (empty for no passphrase): 
Enter same passphrase again: 
Your identification has been saved in /home/mhzzj/.ssh/id_rsa
Your public key has been saved in /home/mhzzj/.ssh/id_rsa.pub
The key fingerprint is:
SHA256:BenbzPgfLVOb9VGmWsaANDH7nLXKvF8XLfNEibbhHKg your email
The key's randomart image is:
+---[RSA 3072]----+
|        ..=.     |
|        .o =. . .|
|       .  +..=..+|
|        ...o+=+=o|
|        SE  ++Xo+|
|        o +o B O+|
|         .  O + =|
|          .  = ..|
|           .o..  |
+----[SHA256]-----+

拷贝密钥到gitee

mhzzj@mhzzj-virtual-machine:~/work/skynetStudy$ cat /home/mhzzj/.ssh/id_rsa.pub #查看生成的密钥
ssh-rsa 
******

在这里插入图片描述
测试密钥是否生效

hzzj@mhzzj-virtual-machine:~/work/skynetStudy$ ssh -T git@gitee.com
The authenticity of host 'gitee.com (180.76.198.77)' can't be established.
ECDSA key fingerprint is SHA256:FQGC9Kn/eye1W8icdBgrQp+KkGYoFgbVr17bmjey0Wc.
Are you sure you want to continue connecting (yes/no/[fingerprint])? yes
Warning: Permanently added 'gitee.com,180.76.198.77' (ECDSA) to the list of known hosts.
Hi mhzzj(@mhz-zzj)! You've successfully authenticated, but GITEE.COM does not provide shell access.

03、创建项目并提交代码

创建项目
在这里插入图片描述
提交代码

mhzzj@mhzzj-virtual-machine:~/work/skynetStudy$ git init
mhzzj@mhzzj-virtual-machine:~/work/skynetStudy$ git add .
mhzzj@mhzzj-virtual-machine:~/work/skynetStudy$ git commit -m "basic skynet"
# 注意,使用ssh提交,否则需要输入账号和密码 如果意见add https,可以使用git remote rm origin删除已有的原创连接
mhzzj@mhzzj-virtual-machine:~/work/skynetStudy$ git remote add origin git@gitee.com:mhz-zzj/skynet-study.git 
mhzzj@mhzzj-virtual-machine:~/work/skynetStudy$ git push -u origin "master"

http://www.niftyadmin.cn/n/5153741.html

相关文章

python2 Unicode和utf-8编码需要注意的地方(u‘‘开头字符串的问题)

python默认Unicode编码,特点是以u为开头,比如u\u798f\u5efa\u7701\u5e94\u6025\u7ba1\u7406\u5385或者urecordCount,但是我们写脚本的时候一般都是utf-8编码,所以有时候会遇到编码冲突。 比如最近在写爬虫,爬虫返回的数…

【斗罗二】木槿被打脸,二级魂导师反击木槿,霍雨浩遭遇挖墙角

Hello,小伙伴们,我是小郑继续为大家深度解析国漫资讯。 深度爆料,《斗罗大陆2绝世唐门》21集最新内容,新生考核结束后,戴华斌的内心对霍雨浩的怨念并没有随着时间的流逝而消散,反而像燎原之火一样越演越烈。他始终耿耿…

MySQL(9):子查询

子查询 指一个查询语句嵌套在另一个查询语句内部的查询,这个特性从MySQL 4.1开始引入。 SQL 中子查询的使用大大增强了 SELECT 查询的能力,因为很多时候查询需要从结果集中获取数据,或者需要从同一个表中先计算得出一个数据结果,…

repo执行出现/usr/bin/env: ‘python’: No such file or directory问题

下载 Repo 工具,并确保它可执行: curl https://storage.googleapis.com/git-repo-downloads/repo > ~/bin/repochmod ax ~/bin/repo 执行 repo version报错: $ repo version /usr/bin/env: ‘python’: No such file or directory查看c…

小户型工业风,陌生上开花知书香。福州中宅装饰,福州装修

漫步陌上 只因陌上花开 花是自然的那种 朴素而恬淡,不落尘俗。—徐志摩 小户型工业风格 满足业主需求 筑造书香押韵家 从动线、色彩、选材、定制等各个环节 与业主一起畅谈家的构造 形成别“居”一格的温暖品质家 以书做墙 告别电视墙 这是一个实用性很强的…

周报4_YMK

FlashAttention 硬件知识 以 A100 (40GB HBM) 为例,下面显示其内存层次结构的粗略图。SRAM内存分布在108个流式多处理器(SMs)上,每个处理器192KB。片上SRAM比HBM快得多,但比HBM小得多,在计算方面,使用Tensor Core的B…

fio数据整理

记录简要的fio数据分析整理,抓取一些关键数据…待完善 import os import reclass saveFio:def __init__(self):#获取当前目录self.path os.getcwd()#设定文件名# 如果是fio多线程,请加上 --group_reporting ,让多个线程读写结果合并&#x…

SAP-PP-常用TCODE

PP主数据管理MM01/MM02物料主数据维护/修改 MM17物料主数据部分字段批量修改 /sapapo/mat1PPDS查看物料主数据 /sapapo/Res01PPDS查看资源主数据 BOM管理CS01/CS02维护/修改/删除BOM 超级BOM涉及到物料分类类型001 ,CT04 创建特性,CL01 创建类 工作中…