Loading [MathJax]/jax/output/CommonHTML/config.js
首页
学习
活动
专区
圈层
工具
发布
首页
学习
活动
专区
圈层
工具
MCP广场
社区首页 >专栏 >Linux运维架构师-企业应用持续集成CICD-07

Linux运维架构师-企业应用持续集成CICD-07

原创
作者头像
用户8639654
修改于 2021-07-07 10:11:20
修改于 2021-07-07 10:11:20
38100
代码可运行
举报
文章被收录于专栏:云计算运维云计算运维
运行总次数:0
代码可运行

5、测试

代码语言:javascript
代码运行次数:0
运行
AI代码解释
复制
[root@localhost ~]# yum install git
........
[root@localhost ~]# ssh -T git@github.com
The authenticity of host 'github.com (13.250.177.223)' can't be established.
RSA key fingerprint is SHA256:nThbg6kXUpJWGl7E1IGOCspRomTxdCARLviKw6E5SY8.
RSA key fingerprint is MD5:16:27:ac:a5:76:28:2d:36:63:1b:56:4d:eb:df:a6:48.
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added 'github.com,13.250.177.223' (RSA) to the list of known hosts.
Hi meteor! You've successfully authenticated, but GitHub does not provide shell access.
[root@localhost ~]#

8、连接远程仓库听方法(创建一个测试存储库)

代码语言:javascript
代码运行次数:0
运行
AI代码解释
复制
# 在github网站新建一个仓库,命名为linux
~~~
 cd /opt
 mkdir linux
 cd linux
~~~
# git初始化,然后做第一个基本的git操作(需要在github上创建存储库)
git init
touch README
git add README
git commit -m 'first commit'
git remote add origin git@github.com:userhub/linux.git
~~~
# 若出现origin已经存在的错误,删除origin
[root@jinch2 linux]# git remote rm origin
# 现在继续执行push到远端
~~~
[root@jinch2 linux]# git remote add origin git@github.com:userhub/linux.git
[root@jinch2 linux]# git push -u origin master
Counting objects: 3, done.
Writing objects: 100% (3/3), 205 bytes | 0 bytes/s, done.
Total 3 (delta 0), reused 0 (delta 0)
To git@github.com:fakehydra/linux-.git
 * [new branch]      master -> master
分支 master 设置为跟踪来自 origin 的远程分支 master。
# 注意
# 设置存储库链接
git remote set-url origin git@github.com:userhub/linux.git
# 如果push失败,合并分支到 master 再push
git pull --rebase origin master

原创声明:本文系作者授权腾讯云开发者社区发表,未经许可,不得转载。

如有侵权,请联系 cloudcommunity@tencent.com 删除。

原创声明:本文系作者授权腾讯云开发者社区发表,未经许可,不得转载。

如有侵权,请联系 cloudcommunity@tencent.com 删除。

评论
登录后参与评论
0 条评论
热度
最新
推荐阅读
领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档
本文部分代码块支持一键运行,欢迎体验
本文部分代码块支持一键运行,欢迎体验