# Error activating private repo on self hosted drone

**URL:** <https://drone.discourse.group/t/error-activating-private-repo-on-self-hosted-drone/9204>\
**Category:** Drone Support\
**Created:** [May 27, 2018, 2:25am UTC](https://drone.discourse.group/t/error-activating-private-repo-on-self-hosted-drone/9204 "2018-05-27T02:25:37Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![doboy](https://yyz1.discourse-cdn.com/flex003/user_avatar/drone.discourse.group/doboy/32/6189_2.png) [@doboy](https://drone.discourse.group/u/doboy)\
**Post date:** [May 27, 2018, 2:25am UTC](https://drone.discourse.group/t/error-activating-private-repo-on-self-hosted-drone/9204/1 "2018-05-27T02:25:37Z")

</div>

I am playing around with drone and deployed a self hosted instance. I am able to “active” my public repos on github however, I am not able to active “private” ones. Looking at the network tab in my chrome browser I see the following request fails with the following response.

REQUEST  
`POST 'https://<my-hosted-url>/api/repos/doboy/secrets'`

RESPONSE  
`GET https://api.github.com/repos/doboy/secrets/hooks: 404 Not Found []`

It would appear that drone is not properly using the access\_token from github. Any insights on what may be happening would be appreciated

Thanks

---

<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:** [May 27, 2018, 3:16am UTC](https://drone.discourse.group/t/error-activating-private-repo-on-self-hosted-drone/9204/2 "2018-05-27T03:16:55Z")

</div>

> Any insights on what may be happening would be appreciated

Did you change or override the default oauth scopes using the DRONE\_GITHUB\_SCOPE environment variable? If configured incorrectly Drone may not have the appropriate access required to make various API calls.

Did you revoke oauth access prior to attempting to activate the repository? These would be the only two root causes I can think of.

> It would appear that drone is not properly using the access\_token from github

The access\_token is set prior to making all API requests to GitHub and the token is configured the same way for all API requests, with no difference in requests for a repository that is public vs private. For this reason, it seems most likely related to GitHub permissions, application configuration, scopes, etc.

---

<div class="post-metadata">

**Author:** ![doboy](https://yyz1.discourse-cdn.com/flex003/user_avatar/drone.discourse.group/doboy/32/6189_2.png) [@doboy](https://drone.discourse.group/u/doboy)\
**Post date:** [May 27, 2018, 4:51pm UTC](https://drone.discourse.group/t/error-activating-private-repo-on-self-hosted-drone/9204/3 "2018-05-27T16:51:17Z")

</div>

Thanks, I did not set DRONE\_GITHUB\_SCOPE at all.
