2017-05-15 140 views
0

我想讓我的作曲家文件從Gitlab中拉出一個存儲庫,但到目前爲止它仍然要求我的用戶名爲&的密碼。私人Gitlab composer存儲庫訪問

{ 
"repositories": [ 
    { 
     "type": "package", 
     "package": { 
      "name": "composer-pkg-name", 
      "version": "0.1.0", 
      "type": "package", 
      "source": { 
       "url": "https://[email protected]/repo-url, 
       "type": "git", 
       "reference": "master" 
      }, 
      "autoload": { 
       "classmap": [""] 
      } 
     } 
    } 
], 
"require": { 
    "blah/composer-pkg-name": "0.1.0" 
}, 
"config": { 
    "gitlab.com": "secret-account-access-token" 
}} 

回答

1

在您的作曲家裏創建auth.json文件。例如。 /home/username/.config/composer如果你使用ubuntu

{ 
    "http-basic": { 
     "gitlab.com": { 
      "username": "login", 
      "password": "password" 
     } 
    } 
}