where the commands are done explicitly in the Drone pipeline. However, when attempting to do the same thing from inside a plugin, I get an error (presumably auth related)
fatal: could not read Username for 'https://github.com': No such device or address
Is this expected behavior? Is there a way for plugins to push to github ?
The gempesaw/drone-git-tag image just runs the same commands as in the explicit version. Other info … we’re running drone 0.8.1 in kubernetes. The repo settings in Drone are ‘Trusted’ and ‘Private’. The repo in Github is also private.
Thanks again, Brad! Introducing fast & useful CI/CD to my company has been one of my long term personal goals, and Drone has been a huge part of that effort for us.
Is this expected behavior? Is there a way for plugins to push to github ?
yes, drone does some magic under the covers where it automatically creates a .netrc file with your git credentials for command steps. If you are creating a plugin, you need to handle creation of this file. Here are bash and Go examples that demonstrate:
doesn’t work, as the original poster states. Has it changed over the years or am I doing something wrong? The pipeline step logs were:
1git: Pulling from library/docker
1s
2Digest: sha256:fe99b62ceb53a90c054c55e86440cf00d13b3ff2f3d99692a0bef4adc1b45c67
9s
3Status: Downloaded newer image for docker:git
9s
4+ git push origin --tags
9s
5fatal: could not read Username for 'https://github.com': terminal prompts disabled
To be explicit, I want this build step to push whatever commits&tags the pipeline has created back to the remote the project was cloned from, and to the current branch the step is working against – master in my example.