问题:

remote: Permission to beijing01/learn_github.git denied to liuhongyang02. fatal: unable to access 'https://github.com/beijing01/learn_github.git/': The requested URL returned error: 403

To see what your remotes are you can run:

git remote -v

产生故障的原因是本地密钥和github上不同 解决方法:

Checking for existing SSH keys
  • Open Terminal.
  • enter ls -al ~/.ssh to see if existing SSH keys are present
  • Check the directory listing to see if you already have a public SSH key.

If you don't have an existing public and private key pair, or don't wish to use any that are available to connect to GitHub, then generate a new SSH key.

If you see an existing public and private key pair listed (for example id_rsa.pub and id_rsa) that you would like to use to connect to GitHub, you can add your SSH key to the ssh-agent.

Generating a new SSH key and adding it to the ssh-agent

Open Terminal. Paste the text below, substituting in your GitHub email address.

This creates a new ssh key, using the provided email as a label.

When you're prompted to "Enter a file in which to save the key," press Enter. This accepts the default file location.

At the prompt, type a secure passphrase. For more information, see "Working with SSH key passphrases".

Adding your SSH key to the ssh-agent

Start the ssh-agent in the background.

If you're using macOS Sierra 10.12.2 or later, you will need to modify your ~/.ssh/config file to automatically load keys into the ssh-agent and store passphrases in your keychain.

Add your SSH private key to the ssh-agent and store your passphrase in the keychain. If you created your key with a different name, or if you are adding an existing key that has a different name, replace id_rsa in the command with the name of your private key file.

Adding a new SSH key to your GitHub account

Copy the SSH key to your clipboard. If your SSH key file has a different name than the example code, modify the filename to match your current setup. When copying your key, don't add any newlines or whitespace.

问题: 错误提示:fatal: remote origin already exists.

GIT常见问题及其解决方案的更多相关文章

  1. 《PDF.NE数据框架常见问题及解决方案-初》

    <PDF.NE数据框架常见问题及解决方案-初> 1.新增数据库后,获取标识列的值: 解决方案:    PDF.NET数据框架,已经为我们考略了很多,因为用PDF.NET进行数据的添加操作时 ...

  2. git push错误解决方案

    错误提示: error: The requested URL returned error: 403 Forbidden while accessing https://nanfei9330@gith ...

  3. XHTML CSS 常见问题和解决方案

    原文地址:XHTML CSS 常见问题和解决方案 作为前端开发人员,在日常的页面制作时,不可避免的会碰上这样那样的问题,我挑选了其中的一些进行总结归档,希望对大家会有所帮助: 1.如何定义高度很小的容 ...

  4. Updates were rejected because the remote contains work that you do(git报错解决方案)

    Updates were rejected because the remote contains work that you do(git报错解决方案) 今天向GitHub远程仓库提交本地项目文件时 ...

  5. 自学华为IoT物联网_06 智慧家庭物联网常见问题及解决方案

    点击返回自学华为IoT物流网 自学华为IoT物联网_06 智慧家庭物联网常见问题及解决方案 1. 家庭中遇到的问题 2.1 华为智慧家庭概念的发展历程 2.2 华为智慧家庭的解决方案架构 智慧家庭主要 ...

  6. 自学华为IoT物联网_05 能源工业物联网常见问题及解决方案

    点击返回自学华为IoT物流网 自学华为IoT物联网_05 能源工业物联网常见问题及解决方案 1. 1 能源工业--油田业务面临的三大挑战 故障处理不及时: 部分油田开采难道大.机械故障较多.现场发生的 ...

  7. 自学华为IoT物联网_04 车联网常见问题及解决方案

    点击返回自学华为IoT物流网 自学华为IoT物联网_04 车联网常见问题及解决方案 1.1 可以预见的车联网未来 车辆对车辆.车辆对道路.车辆对网络通信 车辆对外发送车辆状态信息 周边环境信息发送给车 ...

  8. 自学华为IoT物联网_03 公共事业物联网常见问题及解决方案

    点击返回自学华为IoT物流网 自学华为IoT物联网_03 公共事业物联网常见问题及解决方案 本文从以下六项公共事业,看看物联网的解决方案: 停车问题 路灯管理问题 消防栓管理问题 井盖管理问题 水表管 ...

  9. ARKit从入门到精通(11)-ARKit开发常见问题及解决方案

    转载请注明出处:ARKit从入门到精通(11)-ARKit开发常见问题及解决方案 本文主要介绍ARKit开发过程中一些常见问题 1.ARKit框架无法导入问题 2.ARKit运行黑屏或者白屏问题:Un ...

随机推荐

  1. 缓存的有效期和淘汰策略【Redis和其他缓存】【刘新宇】

    缓存有效期与淘汰策略 有效期 TTL (Time to live) 设置有效期的作用: 节省空间 做到数据弱一致性,有效期失效后,可以保证数据的一致性 Redis的过期策略 过期策略通常有以下三种: ...

  2. Source Maps简介

    提高网站性能最简单的方式之一是合并压缩JavaScript和CSS文件.但是当你需要调试这些压缩文件中的代码时,那将会是一场噩梦.不过也不用担心,souce maps将会帮你解决这一问题. Sourc ...

  3. Java开发包Jedis

    Jedis: http://www.oschina.net/p/jedis (Redis的官方首选Java开发包) <!--Redis --> <dependency> < ...

  4. idea 2019安装完(打不开&&启动不了)问题解决(最全解决方法)

    今天从网盘把idea下载下来后一路安装,准备 设置的时候不管怎么打开 他都无动于衷没办法,卸了安,安了卸,反复折腾了 好几遍 它都无动于衷.于是开始在百度上找答案看了 好几个 方法一遍一遍试还是不行, ...

  5. 小白学Python(2)——常用Python编程工具,Python IDE

    下载好Python,但是如何开始编程呢? 有几种方法, 1.第一个就是command lind 即为命令行的方式,也就是我们常说的cmd. 输入 win+ cmd 在命令行中再输入 python,即可 ...

  6. 强烈推荐 GitHub 上值得前端学习的开源实战项目

    强烈推荐 GitHub 上值得前端学习的开源实战项目. Vue.js vue-element-admin 是一个后台前端解决方案,它基于和 element-ui 实现 基于 iView 的 Vue 2 ...

  7. net core WebApi——文件分片下载

    目录 前言 开始 测试 小结 @ 前言 上一篇net core WebApi--文件分片上传与跨域请求处理介绍完文件的上传操作,本来是打算紧接着写文件下载,中间让形形色色的事给耽误的,今天还是抽个空整 ...

  8. 【码上开心】Windows环境mysql数据库使用(一) 安装Mysql数据库

    [下载MySql] https://dev.mysql.com/downloads/mysql/ 如下图,选择版本,本教程仅演示ZIP压缩包下载配置. 2.[解压到指定目录] 3.[配置环境变量] 4 ...

  9. Cat应用告警实战

    1. Cat应用告警实战 1.1. 前言 好像是中间件设计者的通病,文档写的都是面向有一定使用各种中间件经验的人,告警模块中每个参数其实都可以详细解释一下,要不然我们理解起来真的很吃力还容易采坑 1. ...

  10. MySQL之修改默认引擎和字符集

    一.数据库引擎 1.1 查看数据库引擎 mysql> show engines; +--------------------+---------+------------------------ ...