3

I am using a private repository in my project ( for example https://github.com/org/repo), and recently I am getting the below error message when I trying to run composer install.

[Composer\Downloader\TransportException] The 'https://api.github.com/repos/org/myrepo' URL could not be accessed: HTTP/1.1 400 Bad Request 

1 Answer 1

3

You have to update your auth.json file. Please go to Settings > Developer settings > Personal access tokens (Direct URL: https://github.com/settings/tokens) page and generate a new token and copy the token string then enable sso and authorise with your private organisation. Update your auth.json like below format.

{ "http-basic": { "github.com": { "username": "<YOUR-USERNAME>", "password": "<NEW_TOKEN>" } } } 
Sign up to request clarification or add additional context in comments.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.