curl --location --request POST 'https://api.github.com/repos///keys' \
--header 'Content-Type: application/json' \
--data-raw '{
"key": "ssh-rsa AAA...",
"read_only": true,
"title": "octocat@octomac"
}'
{
"created_at": "string",
"id": 0,
"key": "string",
"read_only": true,
"title": "string",
"url": "string",
"verified": true
}
Authorization: Bearer ********************
true
, the key will only be able to read repository contents. Otherwise, the key will be able to read and write.【GitHub】API开发者 微信交流群
用微信扫右侧二维码,加入【GitHub】API开发者 交流群,互助沟通