Github v3 API - create a REPO

后端 未结 4 1034
心在旅途
心在旅途 2020-12-09 06:46

I’m trying to use the Github v3 API - I already implemented the required OAuth flow and it works well.

Now I’m trying some of the Repos API endpoints (http://develo

4条回答
  •  借酒劲吻你
    2020-12-09 07:38

    For creating repositories as a user you can use an personal access token and basic auth, which can be much simpler when you are fluffing around on the command line and have 2FA enabled.

    curl -d '{"name":"test"}' -u githubuser:personaccesstoken https://api.github.com/user/repos
    

    Create a personal access token here https://github.com/settings/tokens and make sure it has the 'repo' scope.

提交回复
热议问题