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.
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 , 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.
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.