0.8 Private Github and Custom Pipeline Image Permissions

Hi guys, I’m having a strange permissions issue on a private github repo.

Custom Pipeline Image doesn’t have injected github credentials so a ‘git clone’ on the private repo doesn’t work.

I checked to see if the custom docker image is root using whoami, and doing ‘ls -la ~/’ in the drone.yml file doesn’t show a SSH folder.

What’s really making me scratch my head is that I have the EXACT same setup using the EXACT same custom image on another drone server connected to a different github organization. The clone step done by drone works, but once it gets to my pipeline, ‘git clone’ fails.

drone.yml: https://pastebin.com/0DrMbYEM
drone output: https://pastebin.com/PcWzaydX

I suspect I’m missing a step somewhere in the setup of this drone server / organization, but I’m a little stumped, since the drone clone step can clone into the private repo just fine. Any tips?

and doing ‘ls -la ~/’ in the drone.yml file doesn’t show a SSH folder.

Drone does not create an .ssh folder. It creates a .netrc file in /root which is used to authenticate git+https requests. I can see this file in your pastebin output

-rw------- 1 root root   89 Oct 22 10:22 .netrc

The clone error, according to github [1], can happen when the authenticated user does not have permission to access the repository. Perhaps the user that activated the repository (whose credentials are used to clone) does not have appropriate access.

[1] https://help.github.com/articles/error-repository-not-found/

Hi Brad,
thanks again for the quick response. At first, this is what I thought was going on as well, but the first clone step is cloning a repository from the same organization. The drone clone pipeline first gets github.com/uniontsai/heimdal, and my custom pipeline is trying to clone github.com/uniontsai/httpmiddlewarego.

I’m going to do some further testing and see if I can clone the original repository done by the clone pipeline in my own pipeline to see if it works. If not, there’s gotta be something else going on with github permissions.

I’m still a little stumped on this. I’m pretty sure drone has the correct github credentials because like I mentioned in the previous reply, the initial clone pipeline works fine and it clones from the same private organization as I am trying to clone.

For now I’m going to try and recreate the whole drone setup from scratch.

isolated the issue to a fork from one private repo to another private repo. The fork isn’t able to be pulled by drone, so you were right, it’s some kind of permissions issue. Thanks again Brad