“Bad Credentials” when attempting to create a GitHub repo through the CLI using curl

前端 未结 2 1366
醉梦人生
醉梦人生 2021-01-06 18:52

I\'m trying to create a GitHub repo using the command line.

It was suggested here that you can use the following command:

curl -u \'USER\' https://ap         


        
2条回答
  •  一生所求
    2021-01-06 19:27

    What I would do :

     curl -u 'USER:PASWORD' https://api.github.com/user/repos -d '{"name":"REPO"}'
    

    Tested OK on my github account. That way, you will not be prompted to type your password. It that doesn't work, maybe your password is not the good one (or username).

提交回复
热议问题