GitHub - URL could not be accessed: HTTP/1.1 400 Bad Request

user784187

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
Syam Mohan M P

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>"
    }
  }
}

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related