5

I understand that in order to use composer with Magento 2, you need to set up your instance with a public key and private key per the documentation. If you’re working in a team, should the team use the same pair of authentication keys, or should each developer have their own unique pair?

  • Each developer its own pair and one pair each (of lead? or company account) for develop, stage, test system, live, ... – Fabian Blechschmidt Jan 29 '16 at 15:37
2

Unique pair.

Much easier to remove a single developer key pair than it is to reissue keys to the WHOLE dev team…

| improve this answer | |
  • where those key pairs are saved which we can remove individually ? – amitshree Jan 29 '16 at 15:04
1

Each developer its own pair and one pair each (of lead? or company account) for develop, stage, test system, live, ...

| improve this answer | |
0

COMPOSER. HTTP basic authentication

https://getcomposer.org/doc/articles/http-basic-authentication.md

The file should contain a set of hostnames followed each with their own username/password pairs, for example:

{
    "http-basic": {
        "repo.example1.org": {
            "username": "my-username1",
            "password": "my-secret-password1"
        },
        "repo.example2.org": {
            "username": "my-username2",
            "password": "my-secret-password2"
        }
    }
}

multiuser environment

[root@web src]# su developer -s /bin/bash -c "composer create-project --repository-url=https://repo.magento.com/ magento/project-community-edition ."
Authentication required (repo.magento.com):                                                                                                      
      Username: 239874679544d0c72c8cfd5c60b12
      Password: 
Do you want to store credentials for repo.magento.com in /home/developer/.composer/auth.json ? [Yn] y
Installing magento/project-community-edition (2.0.2)
Proceeding without cache
  - Installing magento/project-community-edition (2.0.2)
    Downloading: Connecting...^C
Session terminated, killing shell...^C ...killed.



[root@web src]# composer create-project --repository-url=https://repo.magento.com/ magento/project-community-edition .
    Authentication required (repo.magento.com):
      Username: 95483g8747733gok2c8cfd5c60b12
      Password: 
Do you want to store credentials for repo.magento.com in /root/.composer/auth.json ? [Yn] 

If you don't provide the authentication credentials composer will prompt you upon connection to enter the username and password.

| improve this answer | |
  • Thanks - but that looks like it’s per repo, not per user. I’m asking about multiple users for a single repo. – dbcn Jan 29 '16 at 16:32
  • hm, have you read at the very bottom?? – MagenX Jan 29 '16 at 16:56
  • in a perfect world you must have master or root account, then another for developer, another for sub-contractors, etc... dont say you have one root account for everyone? – MagenX Jan 29 '16 at 17:05
  • That’s what I’m asking. It’s unclear from your example above if you’re running that 2nd create project as a different user, but you’re writing to the same auth.jason file… so how does the auth.jason file manage when multiple users are connecting to the same repository? Also, once you’ve set up your team, if someone leaves, how would you remove their keys? thx! – dbcn Feb 1 '16 at 14:37
  • you not writing to the same file, but every user have its own file to authenticate!! – MagenX Feb 1 '16 at 14:56

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.