Git Upload File Error: fatal: could not read from remote repository. [How to Solve]


git push  – An error is reported after the U origin master is executed

fatal: Could not read from remote repository.


1. Git execution

git remote add origin [email protected]:username/xxx.git

2. Open the .ssh folder

Find the file

3. Open GitHub’s Settings

Select SSH KEYS settings, click the New SSH key button

Open the file with Notepad, copy all the content to the Github key, and click the add ssh key button.


If the error is not resolved, try resetting the SSH key

ssh-keygen -t rsa -C "github账号"

1. Open the .shh  folder, the newly generated id_rsa, two files and the new Key

2. Open the Settings of github and set the ssh key (repeat the above steps to add new SSH key )

Similar Posts: