当前位置:网站首页>Use SSH to pull codes
Use SSH to pull codes
2022-06-29 17:17:00 【Hua Weiyun】
Use
SSHWay to pull code
We are using git When pulling code , Have you ever encountered something like OpenSSL SSL_read: Connection was reset, errno 10054 Error message , Solution reference
The probable cause lies in The Internet On the body , To avoid various modification agents , This machine host And other cumbersome operations , I recommend you to use SSH Way to pull code . So first you need to finish SSH Basic configuration , The following is the detailed configuration process
adopt SSH Way to pull code
If you don't already know git Some of the basics of , please Reference here
1. Configure the username and mailbox
$ git config --global user.name " user name "$ git config --global user.email " User mailbox "2. Generate key pair
First, check whether a secret key pair has been generated on the device
$ cd ~/.ssh // Enter the specified path folder $ ls // View the contents under the folder See if there is id\_rsa and id_rsa.pub Wait for the documents ,.pub The file is a public key , The other file is the key
Without these documents , Or not .ssh Catalog , Then use ssh-keygen Command to create
$ ssh-keygen -t rsa -C " Your email " If prompted , Click on enter that will do ,== No need to set password !== Do you want to enter your password before each code submission ?
After success will prompt
Your public key has been saved in /home/you/.ssh/id_rsa.pub.The key fingerprint is: 3. Get into .ssh Folder , Find public key
Enter the designated path .ssh In the folder , Open in Notepad id_rsa.pub, Select all copy content
It can also be viewed through instructions
$ cat ~/.ssh/id_rsa.pubfor example :
ssh-rsa your secret [email protected]4. Enter the code hosting platform , Upload key
Let's say GitHub For example , Demonstrate relevant operation process
1. land github account , Click on your avatar , then Settings -> SSH and GPG keys -> New SSH key
2、 Then you copy the public key content above , Paste in key In the text field . title Domain , Name yourself
3、 Click on add key
After completion , Verify this key Is it normal work :
$ ssh -T [email protected] to ssh to githubIf , See the following message
Hi xxx! You've successfully authenticated, but GitHub does not # provide shell access.Congratulations , Configuration is successful !
5. Find the project warehouse SSH Address
Use command git remote \-v Check out your current remote url
$ git remote -vorigin https://github.com/username/project.git (fetch)origin https://github.com/username/project.git (push) If it is the result of the above, then it indicates that the project is using https Protocol to access ; If the address is git At the beginning, it means git agreement
Landing on your github Account , View the project Repository ssh Agreed URL

Copy ssh link , Use command git remote set-url modify remote-url, for example :
git remote set-url origin [email protected]:username/project.gitLast command
git remote -v testing URL Has it been modified to SSH Address
6. Use this address to submit... In the future / Just pull the code

边栏推荐
- Flutter technology and Practice (1)
- 【R语言数据科学】:文本挖掘(以特朗普推文数据为例)
- What are the Commonwealth countries
- Étalonnage de la caméra monoculaire et de la caméra binoculaire à l'aide de l'outil d'étalonnage kalibr
- @Difference between component and @configuration
- [R language data science]: Text Mining (taking Trump's tweet data as an example)
- 6.25AtCoderABC257E - Addition and Multiplication 2题解
- Viewing splitchunks code segmentation from MPX resource construction optimization
- Solid state storage manufacturer Yilian joins dragon dragon community to build a new open source ecosystem
- Online text digit recognition list summation tool
猜你喜欢

NAACL 2022 | 机器翻译SOTA模型的蒸馏

【南京大学】考研初试复试资料分享

基于深度学习的Wiki中文语料词word2vec向量模型

自动收售报机

Mysql中锁的使用场景是什么

Tencent cloud released the upgraded version of CDW Clickhouse to provide a fast experience for massive data real-time analysis scenarios

自旋电子学笔记-张曙丰

基于opencv进行双目相机的标定

Naacl 2022 | distillation of machinetranslation SOTA model

Online text digit recognition list summation tool
随机推荐
Kotlin basic grammar
2022年软件评测师考试大纲
Redis principle - sorted set (Zset)
Gradle download slow or unable to download
How to establish and use KUKA subroutines / functions
研究所的这些优势真香!上岸率还极高!
固态存储厂商忆联加入龙蜥社区,共建开源新生态
KUKA机器人外部轴配置你一定要知道的那些知识
MySQL highly available cluster – MHA
PCB板框的绘制——AD19
[R language data science]: Text Mining (taking Trump's tweet data as an example)
Calibration of monocular camera and binocular camera with kalibr calibration tool
从居家办公中感悟适配器模式 | 社区征文
Bags of Binary Words for Fast Place Recognition in Image Sequenc
regular expression
基于深度学习的Wiki中文语料词word2vec向量模型
SAAS 服务的优势都有哪些
Development of freedom free agreement pledge mining system
How to use openmesh to realize the conversion between 3D files of different formats
基于汇编实现的流载体的LSB隐藏项目