# Troubleshooting "error setting commit status" errors

**URL:** <https://drone.discourse.group/t/troubleshooting-error-setting-commit-status-errors/9242>\
**Category:** Drone Support\
**Created:** [July 27, 2018, 9:07pm UTC](https://drone.discourse.group/t/troubleshooting-error-setting-commit-status-errors/9242 "2018-07-27T21:07:45Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![zjs](https://yyz1.discourse-cdn.com/flex003/user_avatar/drone.discourse.group/zjs/32/4157_2.png) [@zjs](https://drone.discourse.group/u/zjs)\
**Post date:** [July 27, 2018, 9:07pm UTC](https://drone.discourse.group/t/troubleshooting-error-setting-commit-status-errors/9242/1 "2018-07-27T21:07:45Z")

</div>

Example error:

```auto
time="2018-07-27T20:14:44Z" level=error msg="error setting commit status for vmware/vic/19642: POST https://api.github.com/repos/vmware/vic/statuses/3474fee798cecced95b3792d150aad19204aeb5a: 404 Not Found []"

```

Docker image: `drone/drone:0.8.4`

Other topics on this issue suggested the `DRONE_HOST` environment variable might be the culprit. However, it appears to be set correctly: `DRONE_HOST=https://ci-vic.vmware.com`.

I was able to manually POST to the URL in the error using `curl`, authenticating with a Personal Access Token.

Is there a way to access the full response Drone is receiving from GitHub? It does not seem to be logged, but the `message` from the body may have some helpful information.

Are there other configuration values that I should check?

---

<div class="post-metadata">

**Author:** ![bradrydzewski](https://yyz1.discourse-cdn.com/flex003/user_avatar/drone.discourse.group/bradrydzewski/32/3513_2.png) [@bradrydzewski](https://drone.discourse.group/u/bradrydzewski)\
**Post date:** [July 27, 2018, 9:32pm UTC](https://drone.discourse.group/t/troubleshooting-error-setting-commit-status-errors/9242/2 "2018-07-27T21:32:02Z")

</div>

Was it working previously? Is it possible that the individual that enabled the project in Drone revoked Drone’s oauth access (token)? Or maybe their permissions on the project changed? Or they were removed from the project?

> Is there a way to access the full response Drone is receiving from GitHub?

Unfortunately not in the current version of Drone, but I actually added this capability a few weeks back. The [relevant changes](https://github.com/drone/go-scm/blob/master/scm/client.go#L99:L102) will land in 0.9.

---

<div class="post-metadata">

**Author:** ![zjs](https://yyz1.discourse-cdn.com/flex003/user_avatar/drone.discourse.group/zjs/32/4157_2.png) [@zjs](https://drone.discourse.group/u/zjs)\
**Post date:** [July 30, 2018, 10:58pm UTC](https://drone.discourse.group/t/troubleshooting-error-setting-commit-status-errors/9242/3 "2018-07-30T22:58:46Z")

</div>

> [@On another topic](https://drone.discourse.group/t/2339/2):
>
> Was it working previously? Is it possible that the individual that enabled the project in Drone revoked Drone’s oauth access (token)? Or maybe their permissions on the project changed? Or they were removed from the project?

It was working previously, but there were some repo membership changes recently, so this may be the issue.

---

<div class="post-metadata">

**Author:** ![bradrydzewski](https://yyz1.discourse-cdn.com/flex003/user_avatar/drone.discourse.group/bradrydzewski/32/3513_2.png) [@bradrydzewski](https://drone.discourse.group/u/bradrydzewski)\
**Post date:** [July 31, 2018, 12:01am UTC](https://drone.discourse.group/t/troubleshooting-error-setting-commit-status-errors/9242/4 "2018-07-31T00:01:11Z")

</div>

@zjs yes, I am guessing that is the root cause 🙂

I recommend having a Drone user with admin access to the repository run the following command from the command line:

```nohighlight
drone repo chown <repo>

```

This will change the repository owner within Drone to the individual that executes the command, and will ensure when Drone is making API calls it uses a token with adequate permissions.

BTW very cool to see projects using Drone at VMWare. If you ever want to jump on a Google Hangout I would love to learn more about what you all are doing and how we (Drone) can help!

---

<div class="post-metadata">

**Author:** ![zjs](https://yyz1.discourse-cdn.com/flex003/user_avatar/drone.discourse.group/zjs/32/4157_2.png) [@zjs](https://drone.discourse.group/u/zjs)\
**Post date:** [July 31, 2018, 9:19pm UTC](https://drone.discourse.group/t/troubleshooting-error-setting-commit-status-errors/9242/5 "2018-07-31T21:19:02Z")

</div>

> [@On another topic](https://drone.discourse.group/t/2339/4):
>
> I recommend having a Drone user with admin access to the repository run the following command from the command line:
> 
> ```auto
> drone repo chown <repo>
> 
> ```

Thanks, this seems to have solved the problem!
