Reputation: 369
When I use a private repository like below in my composer.json
"repositories": [
{
"url": "ssh://repo.com/porject",
"type": "git"
}
],
Composer install/update doesn't ask me for my username, it gets the name of the current user of my computer and uses it automatically. It prompts me only for a password.
Any idea how to set it correctly and how I can store the auth once typed in?
Upvotes: 0
Views: 2921
Reputation: 57683
Try to config access via SSH keys or specify your desired username like below. For more information see the 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"
}
}
}
]
}
Upvotes: 2