D
D
dmitriy-usov2020-03-26 13:17:06
git
dmitriy-usov, 2020-03-26 13:17:06

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


Writes the following:
[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.


What is the actual problem? can anyone come across this?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
N
neksword, 2020-04-03
@dmitriy-usov

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 question

Ask a Question

731 491 924 answers to any question