美文网首页
git项目配置

git项目配置

作者: Gpeko | 来源:发表于2022-07-04 10:01 被阅读0次

1.注册gitee账号

2.安装git

3.配置git

  • 1.配置姓名和邮箱
git config --global user.name "Firstname Lastname"
git config --global user.email "your_email@email.com"

Firstname Lastnameyour_email@email.com为自定义内容
查看配置信息是否成功

cat ~/.gitconfig

成功配置后,显示如下输出

[user]
    name = Firstname Lastname
    email = your_email@email.com
[peko@localhost ~]$  ssh-keygen -t rsa -C "your_email@email.com"
Generating public/private rsa key pair.
Enter file in which to save the key (/home/peko/.ssh/id_rsa):    #回车默认  
Created directory '/home/peko/.ssh'.
Enter passphrase (empty for no passphrase): #输入密码 
Enter same passphrase again: #再次输入密码

your_email@email.com改成自己的邮箱地址
输入密码以后生成如下

Your identification has been saved in /home/peko/.ssh/id_rsa.    #私有密钥
Your public key has been saved in /home/peko/.ssh/id_rsa.pub. #公开密钥
The key fingerprint is:
SHA256:rYpYFp/gnaWz/V1YWMFV0sWemPA/W8KSjuIHruBMLqI your_email@email.com
The key's randomart image is:
+---[RSA 2048]----+
|             .o+*|
|           .  .oo|
|            o +..|
|         .   * ..|
|    o   S . .oo  |
|   . = =..  oooo.|
|    * B... o....+|
|. .O o =o o... . |
|E...= +oo+. .    |
+----[SHA256]-----+

id_rsa文件是私有密钥,id_rsa.pub是公开密钥

  • 3.添加公开密钥
    image.png
    image.png
    image.png
    标题栏中输入适当的密钥名称,用Company即可
    Key则需要将刚才生成的公共密钥内容复制进去
    查看id_rsa.pub文件中的内容
cat ~/.ssh/id_rsa.pub
ssh-ras 密钥内容 your_email@email.com

ssh-ras 密钥内容 your_email@email.com的内容全部复制到Key
单击确定按钮完成添加

  • 4.进行认证
ssh -T git@gitee.com
The authenticity of host 'github.com (13.250.177.223)' can't be established.
RSA key fingerprint is *** #fingerprint值
RSA key fingerprint is *** #fingerprint值
Are you sure you want to continue connecting (yes/no)? #输入yes

成功后出现如下结果

Hi Gpeko! You've successfully authenticated, but GitHub does not provide shell access.

4.安装pycharm

5.拉取项目

相关文章

  • 工具配置

    git配置 多项目配置不同用户 取消git全局配置 在项目下配置用户信息 CMD 配置 设置代理 设置为使用IE代理

  • idea 显示git配置在哪里

    当前项目配置 git config -e 全局配置 git config --global -e

  • Android Studio中Git的使用以及配置

    配置git 配置git仓库 在本地为项目创建git仓库为项目创建GIt仓库 在自己的GitHub中创建一个repo...

  • 为as 配置 git

    as导入github项目 as提示没有git 下载 安装 Git as配置git

  • git学习-1 常用命令总结

    查看配置 查看当前git配置 git config --list git全局的配置文件位置: 1、cd到项目文件中...

  • [持续更新] Git常用命令收录

    git项目配置信息查看git config -lgit项目的地址查看git remote -vgit remote...

  • jenkins构建时支持git选择分支

    安装Git Parameter 安装插件成功后查看如下 重新配置项目 添加 git 参数 配置git参数,要选择高...

  • 纯前端服务器配置

    纯前端服务器配置 服务器环境 配置git项目 配置git自动同步 配置后端服务器别名 通过Git提交与更新代码 纯...

  • git配置

    Git配置 在线配置 第一次使用GIT,创建仓库并提交项目代码 常用命令配置 Git 提供一个git config...

  • Ubuntu之git配置

    安装git clone 项目 git clone xx@xxx:xxx git配置 命令行执行后生成的配置文件位于...

网友评论

      本文标题:git项目配置

      本文链接:https://www.haomeiwen.com/subject/cfkdbrtx.html