Answer the question
In order to leave comments, you need to log in
I can't push a project to a remote repository. What could be the problem?
I'm trying to push a project to a newly created remote repository using the command:
PS C:\Users\feedb\Desktop\new1> git push -u origin master
[email protected]: Permission denied (publickey).
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.
Answer the question
In order to leave comments, you need to log in
This error indicates that you are trying to SSH into git without providing a public key.
You have two options:
1. generate a pair of keys (public + private) (ssh-keygen) and add a PUBLIC key in your profile settings in the git. This will allow you to interact with the repository via SSH. The public key has the .pub extension. At least on Linux it is, I think it's identical on Windows. If so, google. The key file can be opened with any text editor. Its content must be added to the profile.
2. knock on the git via HTTPS, then the key is not needed, it will be enough to enter the password and login from the account in the git.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question