My actions:

  1. Check if I have the key cat ~/.ssh/id_rsa.pub
  2. I generate key ssh-keygen -t rsa -C "myemail@email.com" ; passphrase did not fill out (although it did, too, but nothing changed)
  3. I looked in the user’s folder (under which I’m in Ubuntu) two id_rsa and id_rsa.pub files were created
  4. I copy the key xclip -sel clip < ~/.ssh/id_rsa.pub
  5. In gitlab in the ssh section I insert this key and save.
  6. Now in the folder where I used to pull off the project ( git clone ) I try to make composer update , then I still ask for a password, only the password is not from my login on gitlab but from git@gitlab.myproj.com

How to do?

  • you need to add the key to the gitlab.myproj.com website. I think you can use the same one. - KoVadim
  • And the configuration of mail and the user is? git config --global user.email myemail@email.com ... - Nick Volynkin
  • Showed another email - Fitstd
  • one
    In any case, there is an easy way to check if the connection is working. just run ssh -T git@gitlab.myproj.com in the console - it should say that everything is ok. - KoVadim
  • 2
    And this is the answer. Because sudo changes the current user and the file with the keys is unavailable. - KoVadim

1 answer 1

In my case, there was an error, because sudo composer install wrote, and sudo changes the user, so in this situation it is correct to write composer install

  • 2
    without sudo, write correctly anytime and anywhere , except in those rare cases when you need to perform some administrative action. - aleksandr barakin
  • one
    It was possible to configure the system so that when sudo the key was kept in the agent . - AK