SSH problems in Git / Github

Asked

Viewed 52 times

-1

I’m trying to push some files to my github, but I started having this problem: When I give the git push -u origin master or git push -u origin main command, the message appears below

sign_and_send_pubkey: Signing failed: agent refused Operation [email protected]: Permission denied (publickey). Fatal: Could not read from remote.

Please make sure you have the correct access Rights and the Repository exists.

I’ve done some digging, all the way up here to see if I can find someone with a similar problem, but I’m still not working on it. Most of the situations I’ve seen are due to the person not having an active SSH key. When I follow the tutorial to check if I already have one (from this site: https://docs.github.com/en/github/authenticating-to-github/connecting-to-github-with-ssh/checking-for-existing-ssh-keys), appears yes. I’ve even added it to my github account from this tutorial https://docs.github.com/en/github/authenticating-to-github/connecting-to-github-with-ssh/adding-a-new-ssh-key-to-your-github-account. But I still can’t push anything. I’m new to git/github, but I’ve never had problems, especially so far. Could someone help me?

3 answers

0

On your github go to "Settings" > "Developer Settings" > "Personal access tokens" > "Gerenate new Token", select what this token is authorized to do, and then "Genataye token", store this token well. After that instead of using your github password to pull’s and push’s, use this token.

0

I’m sorry, I tried to do this, but I keep having the same problem. I’m not able to send anything to my github by command line.

-2

In order to use "git push -u origin main", use the repository link.

Example: git push -u https://github.com/Felipe/repositorio.git

this link is the https link that is provided when creating a new repository.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.