- 
                Notifications
    
You must be signed in to change notification settings  - Fork 430
 
Closed
Labels
area: command: inittype: bugcode to address defects in shipped codecode to address defects in shipped code
Description
Describe the bug
A clear and concise description of what the bug is.
To Reproduce
Steps to reproduce the behavior:
- remove the global 
~/Library/Preferences/netlify/config.json - run 
netlify initin a new project - Select Authentication via netlify app
 - Use Github as the authentication method.
 - It will fail with 
401 Bad Credentials 
Regression was introduced with this change: https://github.com/netlify/cli/pull/3569/files#diff-f64dd88efec835a92fdd4fd9b786ef5faf32c0c732656935ec33a443efb2c912R39
The problem is that the return type of the getGitHubToken changed from Promise<Record<string, string>> to Promsie<URLSearchParams> which cannot be set inside the globalConfig.
Just to note (TypeScript would have prevented this)
Expected behavior
Authentication via Github should work
CLI Output
Adding deploy key to repository...
 ›   Error: Failed retrieving GitHub repository information with error: Bad credentials.
Metadata
Metadata
Assignees
Labels
area: command: inittype: bugcode to address defects in shipped codecode to address defects in shipped code