0

I added SSH key using this instruction. Despite it, a personal access token is required when I try to git pull. Is it normal? I can't have multiple accounts in Windows because of this issue. The only difference with the instruction that my key name is specific, I added config file into ~/.ssh directory:

Host github.com
  HostName github.com
  User git
  IdentityFile ~/.ssh/id_ed25519_some_tag

UPD: I also noticed that the problem occurs only if I git clone https://... but not when git clone [email protected]:username/gitname.git. Can somebody explain how it works?
UPD2: git clone git@... only worked for the first account but I can't git clone git@... using the second account. I'm trying git clone a private repo.

2
  • 1
    Using "git clone https://..." is not using ssh, so your ssh config will not be used. For why you can't use the same config on 2 accounts, it is likely you have only added your ssh key to one account. If you give some more details, we might be able to help you out.
    – Randomhero
    Nov 1, 2021 at 9:09
  • 1
    @Randomhero thank you, it's actually enough information. For some reason I thought ssh keys are used for https connection too. Now it all works fine Nov 1, 2021 at 23:45

1 Answer 1

1

From my comment above:

Using "git clone https://..." is not using ssh, so your ssh config will not be used.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .