1

I have two Github accounts - let's say setevoy and an othername.

I used both for one project, and then access for othername was disabled, so I have to use my main account - setevoy.

I my ~/.ssh.config I have an entry for Github auth:

$ cat ~/.ssh/config                                                                                                                                                                                                                         
Host bitbucket.blabla.net                                                                                                                                                                                                                                                        
 User blablauser                                                                                                                                                                                                                                                         
 IdentityFile  /home/setevoy/.ssh/setevoy_main_priv_openssh                                                                                                                                                                                                                    

Host bitbucket.org                                                                                                                                                                                                                                                             
 IdentityFile  /home/setevoy/.ssh/setevoy_main_priv_openssh

Host github.com
  User setevoy
  IdentityFile  /home/setevoy/.ssh/setevoy_main_priv_openssh

Now, if I try to run clone for this project - I have an error:

fatal: Could not read from remote repository. Please make sure you have the correct access rights

And SSH still gives me an old, disabled, account:

$ ssh -T git@github.com

Hi othername! You've successfully authenticated, but GitHub does not provide shell access.

In my setevoy account's settings I have exactly setevoy_main_priv_openssh key added.

I could use project's repositories via browser under setevoy username and I can use my own repositories with terminal and SSH keys.

What I'm doing wrong here? Maybe I'm not aware of kind of "caching" for SSH sessions and it still trying to use old username?

setevoy
  • 4,374
  • 11
  • 50
  • 87

0 Answers0