M
M
Mikhail Mikhail2018-11-14 19:45:33
git
Mikhail Mikhail, 2018-11-14 19:45:33

How to make vs code work from github using ssh key in windows 10?

Good afternoon. I have a problem that I don’t know how to overcome
, I have windows 10 1803. There is a standard ssh-client and with it I generated a key
ssh-keygen -t rsa -b 2048
, it is in ~/.ssh/id_rsa and ~/.ssh/id_rsa.pub.
~/.ssh/id_rsa.pub opened and copied to github.com. those. he's definitely there.
in cmd I try it
ssh [email protected]
arrives

Enter passphrase for key 'C:\Users\user/.ssh/id_rsa':

if I enter the password, then everything seems to be normal
Connection to github.com closed.
. I created a repository on github, copied the link to it via ssh
git remote -vand displays them.
So, when you try to push changes to github through vs code, it arrives
Error: Permission denied (publickey)
spoiler
Please make sure you have the correct access rights
and the repository exists.
> git rev-parse --show-toplevel
fatal: not a git repository (or any of the parent directories): .git
> git rev-parse --show-toplevel
fatal: not a git repository (or any of the parent directories): .git
> git show :server_authentication/app/authentication/init.js
> git check-ignore -z --stdin
> git show :server_authentication/app/user/init.js
> git show :server_authentication/app/authentication/middleware.js
> git fetch
> git show :server_authentication/app/authentication/middleware.js
[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.
> git push 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.
> git fetch
> git show :server_authentication/app/authentication/middleware.js
[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.


i created a .config file in ~/.ssh/
spoiler
Host *
ForwardAgent yes

Host git
HostName [email protected]
User user


But the error still remains
Installed github desctop... same story

Answer the question

In order to leave comments, you need to log in

1 answer(s)
M
Mikhail Mikhail, 2018-11-17
@soveckii_fonarik

everything turned out to be much easier
just not to specify the password when creating the ssh key :\

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question