Tag Archives: GitHub error

github Error: Logon failed, use ctrl+c to cancel basic credential prompt.

Logon failed, use ctrl+c to cancel basic credential prompt.

Today, when updating something on gitHub, the password is correct, and you can’t log in more than push. According to the prompt, you find that the previous configuration doesn’t work. The updated configuration is as follows:



set it in the individual

Check these

Generate a token and record it

Continue to push. Enter the password of the account when logging in for the first time, and enter the generated token for the second time

successfully push

[Solved] github Error: ERROR: You‘re using an RSA key with SHA-1

github Error: ERROR: You're using an RSA key with SHA-1,RSA can not used and need to upgrade:

ERROR: You're using an RSA key with SHA-1, which is no longer allowed. Please use a newer client or a different key type.
Please see https://github.blog/2021-09-01-improving-git-protocol-security-github/ for more information.

Solution:

# Generate a new secret key, if you report an error unknown key type ed25519, use this: ssh-keygen -t ecdsa -b 521 -C "[email protected]", all the way back to the car (the first carriage return is the name of the generated secret key, do not give the default, the last two are the password, you can do without)
$ ssh-keygen -t ed25519 -C "[email protected]"

# start ssh proxy, use different commands depending on the environment
$ eval "$(ssh-agent -s)"

# Add the secret key to the agent, and if there are other previous secret keys, add them too
$ ssh-add id_ecdsa

# View the secret key and copy and paste it to GitHub
$ cat ~/.ssh/id_ecdsa

# Test, it's best to pull a project to see if it can be accessed
$ ssh -T [email protected]

log

(pytorch) [yudong@admin1 Temp]$ git pull
ERROR: You are using an RSA key with SHA-1, which is no longer allowed. Please use a newer client or a different key type.
Please see https://github.blog/2021-09-01-improving-git-protocol-security-github/ for more information.

fatal: Could not read from remote repository.

Please make sure you have the correct access rights
and the repository exists.
# 生成秘钥
(pytorch) [yudong@admin1 .ssh]$ ssh-keygen -t ecdsa -b 521 -C "[email protected]"
Generating public/private ecdsa key pair.
Enter file in which to save the key (/public/home/yudong/.ssh/id_ecdsa): 
Enter passphrase (empty for no passphrase): 
Enter same passphrase again: 
Your identification has been saved in /public/home/yudong/.ssh/id_ecdsa.
Your public key has been saved in /public/home/yudong/.ssh/id_ecdsa.pub.
The key fingerprint is:
7a:3b:30:d8:b5:a3:5d:c7:85:8b:82:b6:75:2a:d8:fc [email protected]
The key's randomart image is:
+--[ECDSA  521]---+
|                 |
|                 |
|             .   |
|        .   . .  |
|     o oS. o o   |
|    . *.= + +    |
|     =.B.* .     |
|    . *.+.       |
|       oE.       |
+-----------------+
(pytorch) [yudong@admin1 .ssh]$ ls
authorized_keys  config  id_ecdsa  id_ecdsa.pub  id_rsa  id_rsa.pub  known_hosts
# start shh proxy
(pytorch) [yudong@admin1 .ssh]$ eval "$(ssh-agent -s)"
Agent pid 210477
# add proxy
(pytorch) [yudong@admin1 .ssh]$ ssh-add id_ecdsa
Identity added: id_ecdsa (id_ecdsa)
(pytorch) [yudong@admin1 .ssh]$ ssh-add id_rsa
Identity added: id_rsa (id_rsa)
# check the public key
(pytorch) [yudong@admin1 .ssh]$ cat id_ecdsa.pub 
ecdsa-sha2-nistp521 AAAAE2VjZHXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXkfa6XXXqOS62um3j8ZOXVdabpGwCRCVBLlxMNfmNPRNG2FEl3rkxpw2O91MAINv+JiXPU56sA== [email protected]
# test
(pytorch) [yudong@admin1 .ssh]$ ssh -T [email protected]
Hi ydduong! You have successfully authenticated, but GitHub does not provide shell access.
(pytorch) [yudong@admin1 .ssh]$ cd ../Temp/
# test
(pytorch) [yudong@admin1 Temp]$ git pull
remote: Enumerating objects: 10, done.
remote: Counting objects: 100% (9/9), done.
remote: Compressing objects: 100% (3/3), done.
remote: Total 6 (delta 3), reused 6 (delta 3), pack-reused 0
Unpacking objects: 100% (6/6), done.
From github.com:ydduong/Temp
   5e7379d..aec2a53  main       -> origin/main
Updating 5e7379d..aec2a53
Fast-forward
 Snipaste_2022-03-25_23-26-58.png | Bin 0 -> 238594 bytes
 plt.py                           |  65 +++++++++++++++++++++++++++++++++++++++++++++++++----------------
 2 files changed, 49 insertions(+), 16 deletions(-)
 create mode 100644 Snipaste_2022-03-25_23-26-58.png
(pytorch) [yudong@admin1 Temp]$ 

[Solved] GitHub Error: remote: Support for password authentication was removed on August 13, 2021.

Errors are reported as follows:

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.

reason:

GitHub will enable token token token to replace password from August 13, 2021

Generate your own token

Note: be sure to save the generated token, because you can’t see it again after refreshing the page

Just paste the saved token where you enter the password as before

Anaconda prompt running environment.yml [How to Solve]

Download the project from GitHub, then open Anaconda Prompt, cd all the way to the directory where environment.yml is located, and

conda env create -f environment.yml

Next reported error.

WARNING: A space was detected in your requested environment path
‘D:\Program Files\miniconda3\envs\nerf’
Spaces in paths can sometimes be problematic.
Collecting package metadata (repodata.json): done
Solving environment: failed
ResolvePackageNotFound: – imagemagick

environment.yml script:

# To run: conda env create -f environment.yml
name: nerf
channels:
    - conda-forge
dependencies:
    - python=3.7
    - pip
    - cudatoolkit=10.0
    - tensorflow-gpu==1.15
    - numpy
    - matplotlib
    - imageio
    - imageio-ffmpeg
    - configargparse
    - imagemagick

Modify the environment.yml script:

PIP: the following must be indented (Python)

# To run: conda env create -f environment.yml
name: nerf
channels:
    - conda-forge
dependencies:
    - python=3.7
    - pip
    - cudatoolkit=10.0
    - numpy
    - matplotlib
    - imageio
    - imageio-ffmpeg
    - configargparse
    - pip:
        - imagemagick
        - tensorflow-gpu==1.15

Report error again

If there are the following errors, most of them are syntax errors, check environment.yml carefully

>>>>>>>>>>>>>>>>>>>>>> ERROR REPORT <<<<<<<<<<<<<<<<<<<<<<
>    ruamel_yaml.parser.ParserError: while parsing a block collection
      in "<unicode string>", line 6, column 5:
            - python=3.7
            ^ (line: 6)
    expected <block end>, but found '?'
      in "<unicode string>", line 14, column 5:
            -pip:
            ^ (line: 14)

Solve the problem