Github v3 API - create a REPO

后端 未结 4 1053
心在旅途
心在旅途 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:47

    This script lets you read in in the token and project name as variables so you can use it in a script

    #!/usr/bin/env bash -u
    #
    
    TOKEN=`cat token_file`
    PROJECT=myproject
    
    curl -X POST -H 'Content-Type: application/x-www-form-urlencoded' -d '{"name": "'"$PROJECT"'"}' https://api.github.com/user/repos?access_token=$TOKEN
    

提交回复
热议问题