zoukankan      html  css  js  c++  java
  • remote: Support for password authentication was removed on August 13, 2021. Please use a personal access token instead.

    remote: Support for password authentication was removed on August 13, 2021. Please use a personal access token instead.
    remote: Please see https://github.blog/2020-12-15-token-authentication-requirements-for-git-operations/ for more information.
    fatal: Authentication failed for 'https://github.com/aaromthon/wanda.git/'

    解决办法:

    进入git bash界面然后:
    一、git config --global --list 验证邮箱与GitHub注册时输入的是否一致,如下:

    $ git config --global --list
    user.email=14392***@qq.com
    user.name=14392***@qq.com
    http.sslverify=false

    二、设置全局用户名和邮箱,如下:

    $ git config --global user.name "username"
    $ git config --global user.email "14392***@qq.com"

    三、ssh-keygen -t rsa -C “这里换上你的邮箱”,一路回车,在出现选择时输入Y,再一路回车直到生成密钥。会在/Users/***/路径下生成一个.ssh文件夹,密钥就存储在其中,如下:

    $ ssh-keygen -t rsa -C "14392***@qq.com"
    Generating public/private rsa key pair.
    Enter file in which to save the key (/c/Users/Lenovo/.ssh/id_rsa):
    Enter passphrase (empty for no passphrase):
    Enter same passphrase again:
    Your identification has been saved in /c/Users/Lenovo/.ssh/id_rsa
    Your public key has been saved in /c/Users/Lenovo/.ssh/id_rsa.pub
    The key fingerprint is:
    SHA256:cmghkaLRiF50CP*************** 14392***@qq.com
    The key's randomart image is:
    +---[RSA 3072]----+
    |.**=*******o.    |
    |=o+****Xo...     |
    |+oEBEo=.          |
    |.=+.o= o         |
    |.. .+ A S        |
    |  .. o =         |
    |      .          |
    |                 |
    |                 |
    +----[SHA256]-----+

    四、复制 /c/Users/Lenovo/.ssh/id_rsa.pub 里面的内容到到git仓库,添加秘钥,如下:

     

     

     

     五、ssh -T git@github.com 测试一下通不通,通了显示如下:

    $ ssh -T git@github.com
    Hi aaro***! You've successfully authenticated, but GitHub does not provide shell access.

    即可正常使用。
    如果不通如下两步操作即可:

    $ ssh-agent -s
    $ ssh-add ~/.ssh/id_rsa

    结束!

  • 相关阅读:
    屏蔽2003:在系统启动时至少有一个服务或驱动程序产生错误
    C#中有关string和byte[]转换的问题
    如何控制winform程序只能打开一个呢?
    ArrayList的使用方法【转载】
    ASP.NET中ajaX学习记录
    C#去除字符串空格的几种方法【转载】
    C# 中2,10,16进制及其ASCII码之间转化
    vc++下char数组赋值乱码问题
    c#关机时自动退出程序
    Android入门前言(一)之Android应用开发入门五问 (转自:http://blog.csdn.net/android_tutor/)
  • 原文地址:https://www.cnblogs.com/aaronthon/p/15468405.html
Copyright © 2011-2022 走看看