Magento Stack Exchange is a question and answer site for users of the Magento e-Commerce platform. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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?

share|improve this question
    
Each developer its own pair and one pair each (of lead? or company account) for develop, stage, test system, live, ... – Fabian Blechschmidt Jan 29 at 15:37

Unique pair.

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

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

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

share|improve this answer

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.

share|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 at 16:32
    
hm, have you read at the very bottom?? – MagenX Jan 29 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 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 at 14:37
    
you not writing to the same file, but every user have its own file to authenticate!! – MagenX Feb 1 at 14:56

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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