authentication - Composer asks only for password with private repository -


when use private repository below in composer.json

  "repositories": [     {       "url": "ssh://repo.com/porject",       "type": "git"     }   ], 

composer install/update doesn't ask me username, gets name of current user of computer , uses automatically. prompts me password.

ask password img

any idea how set correctly , how can store auth once typed in?

try config access via ssh keys or specify desired username below. more information see composer docs.

{     "repositories": [         {             "type": "composer",             "url": "ssh2.sftp://example.org",             "options": {                 "ssh2": {                     "username": "composer",                     "pubkey_file": "/home/composer/.ssh/id_rsa.pub",                     "privkey_file": "/home/composer/.ssh/id_rsa"                 }             }         }     ] } 

Comments