你可以使用git remote命令查看当前配置的远程仓库列表,并使用git push和git pull命令与不同的远程仓库进行交互。 例如,要切换到Github仓库并推送代码,可以使用以下命令: git remote set-url origin <github_repo_url> git push origin master 同样地,要切换到Gitee仓库并拉取代码,可以使用以下命令: git remote set-...
https://github.com/settings/keys 将id_rsa.github.pub 中的内容填进去 https://gitee.com/profile/sshkeys 将id_rsa.gitee.pub 中的内容填进去 测试配置是否成功 Gitee ssh -T git@gitee.com# 提示确认,输入yes,回车# 输出Hi,xxxx,successfully 字样,代表连接成功 GitHub ssh -T git@github.com# 提示确...
ssh-add id_rsa.github Identity added: id_rsa.github (id_rsa.github) tips:如果是其他的平台,如,gitee,gitlab,格式如下 2.4.多账号必须配置 config 文件(重点) 2.4.1若无 config 文件,则需创建 config 文件 ni config 2.4.2.config 里需要填的内容 Host github.com HostName github.com User git Iden...
IdentityFile~/.ssh/id_rsa.github # gitee Host gitee.com Port22HostName gitee.com User git IdentityFile~/.ssh/id_rsa.gitee 添加ssh https://github.com/settings/keys 将id_rsa.github.pub中的内容填进去,起名的话随意。 https://gitee.com/profile/sshkeys 将id_rsa.gitee.pub中的内容填进去,起名...
git config --global user.name "你的名称" git config --global user.email 邮箱号 3. 生成 SSH key 打开git Bash,运行下面的命令,过程中直接按 Enter 就行 ssh-keygen -t rsa -C 'github邮箱号' -f ~/.ssh/id_rsa_github ssh-keygen -t rsa -C 'gitee邮箱号' -f ~/.ssh/id_rsa_gitee ...
git config配置文件的增删改查 1.git config --global --add configName configValue 解释:给指定的级别的指定config增加一个值 2.删git config --global --unset configName (只针对存在唯一值的情况) 为了测试先增加一个 3.改 git config --global configName configValue ...
1. 注册gitee或github账户以及创建仓库(已有账户者直接创建仓库) 2. 将新建仓库克隆到本地作为上传仓库(例如:我的新仓库为 git-usage) $ git clonehttps://gitee.com/javychen-cn/git-usage 3. 安装git(以ubuntu为例) $ apt install git 4. 配置git ...
Port22HostName gitee.com User git IdentityFile~/.ssh/id_rsa.gitee 添加ssh https://github.com/settings/keys 将id_rsa.github.pub中的内容填进去,起名的话随意。 https://gitee.com/profile/sshkeys 将id_rsa.gitee.pub中的内容填进去,起名的话随意。
一、安装Git / VsCode配置Git / Win10系统 二、Git配置 Gitee和Github的私钥密钥 三、Github平台和Gitee平台配置公钥 四、测试链接 五、回到 VsCode 进行: 拉取/暂存/提交/推送 学习记录,好记不如烂笔头 如有不对之处欢迎大佬指点 ! 记录平台 :
配置多个gitee账号和github账号 打开Git Bash,进入到Git repository所在目录,右键->Git Bash HereGit Bash Here进入.ssh配置目录 cd C:\Users\win10User\.ssh 生成一个github用的SSH-Key ssh-keygen -t rsa -C 'xxx1@126.com' -f C:/Users/win10User/.ssh/id_rsa_gitee_firstUser ...