我创建了一个名为testingProtectedBranch
的临时存储库,用于通过curl
测试github
中protected branches
的创建。 这是我用于此目的的命令,但它不起作用。 我试图找到约2小时的错误,但仍然找不到它。 任何人都可以帮助我找到这个命令中的错误。 提前致谢
curl -X PUT -H "Accept:application/vnd.github.loki-preview+json" -d '{"required_status_checks": {"include_admins": true,"strict": true,"contexts": ["continuous-integration/travis-ci"]},"required_pull_request_reviews": {"include_admins": false},"restrictions": {"users": ["octocat"],"teams": ["justice-league"]}}' https://api.github.com/repos/kasunsiyambalapitiya/testingProtectedBranch/branches/master/protection
用-vv更新
尝试192.30.253.117 ... 连接到api.github.com(192.30.253.117)端口443(#0) 在/etc/ssl/certs/ca-certificates.crt中找到173个证书 在/ etc / ssl / certs中找到了697个证书 ALPN,提供http / 1.1 SSL连接使用TLS1.2 / ECDHE_RSA_AES_128_GCM_SHA256 服务器证书验证确定 服务器证书状态验证SKIPPED 通用名称:* .github.com(匹配) 服务器证书到期日期确定 服务器证书激活日期确定 证书公钥:RSA 证书版本:#3 标题:C = US,ST =加州,L =旧金山,O = GitHub ,Inc.,CN = *。github.com 开始日期:2014年4月8日星期二00:00:00 GMT 截止日期:2017年4月12日星期三12:00:00 GMT 发行人:C =美国,O = DigiCert公司,OU = www.digicert.com CN = DigiCert SHA2高保证服务器CA 压缩:NULL ALPN,服务器接受使用http / 1.1
PUT /repos/kasunsiyambalapitiya/testingProtectedBranch/branches/master/protection HTTP/1.1
Host: api.github.com
User-Agent: curl/7.47.0
Accept:application/vnd.github.loki-preview+json
Content-Length: 217
Content-Type: application/x-www-form-urlencoded
上传完全发送关闭:217个字节中的217 <HTTP / 1.1 404 Not Found <服务器:GitHub.com <日期:2017年1月11日星期三12:45:54 GMT <Content-Type:application / json; charset = utf-8 <Content-Length:87 <Status:404 Not Found <X-RateLimit-Limit:60 <X-RateLimit-Remaining:58 <X-RateLimit-Reset:1484141537 <X-GitHub-Media-Type: github.loki预览; format = json <Access-Control-Expose-Headers:ETag,Link,X-GitHub-OTP,X-RateLimit-Limit,X-RateLimit-Remaining,X-RateLimit-Reset,X-OAuth-Scopes,X-Accepted- OAuth-Scopes,X-Poll-Interval <Access-Control-Allow-Origin:* <Content-Security-Policy:default-src'none'<Strict-Transport-Security:max-age = 31536000; includeSubdomains; preload <X-Content-Type-Options:nosniff <X-Frame-Options:deny <X-XSS-Protection:1; mode = block <X-GitHub-Request-Id:CB5E5F06:772E:59404EA:58762901 <{“message”:“Not Found”,“documentation_url”:“https://developer.github.com/v3”} 连接#0到主机api.github.com保持不变
链接地址:
http://www.djcxy.com/p/48977.html
上一篇:
Curl PUT is not working as expected for updating branch protection on github
下一篇:
TeamCity Git plugin fails with SSL handshake error