-
Notifications
You must be signed in to change notification settings - Fork 197
create refs fails with encrypted error "Invalid request.\n\nFor 'links/0/schema', nil is not an object" #137
Comments
@reachvimalm , There is some problem with the data you are posting. The API is not able to interpret your data properly. Since you are using python requests module, I suggest using the json keyword when doing a requests.post() |
I got such an error from GitHub API when I didn't send any POST data. |
I am getting the same error. @reachvimalm @hckr were you able resolve it?
|
I was able to solve it. My request was not correct. |
My request also wasn't correct, it lacked message body. |
Hey!! I also have same issue while trying to dispatch the Github Actions via the Github API. Following is my post request:
I am getting the following credentials :
|
I am using REST API to create branch on my fork. but it throws weird error "Invalid request.\n\nFor 'links/0/schema', nil is not an object."
I am using python session.post
Request
[https://mygit.com/api/v3/repos/vimal/myproj/git/refs] ref [refs/heads/readme]
{'Accept-Encoding': 'gzip, deflate', 'Accept': '/', 'User-Agent': 'python-requests/2.18.4', 'sha': u'fc20403521d0bcea35b3b14a3622ffdd5d0359bc', 'Connection': 'keep-alive', 'ref': 'refs/heads/readme', 'Authorization': 'token 123x'}
Response
{u'documentation_url': u'https://developer.github.com/enterprise/2.12/v3/git/refs/#create-a-reference', u'message': u"Invalid request.\n\nFor 'links/0/schema', nil is not an object."}
The text was updated successfully, but these errors were encountered: