Pass OAuth Credentials to Drone CLI

As part of our pipeline, we clone a private repo that provides various dependencies. This isn’t a problem on drone server when the Oauth credentials are provided, but I’d like to run our pipeline locally to test it out. I found a bit of info about that here

The server has access to your oauth credentials and uses these credentials to generate a netrc file. These credentials need to be provided to the command line runner to more closely emulate the server environment.

I couldn’t find info on how to do this anywhere, any help would be much appreciated!

when invoking drone exec you can pass your credentials using these command line flags:

   --netrc-username value  
   --netrc-password value  
   --netrc-machine value  

for example, it would look something like this [1]:

drone exec \
   --netrc-username "bradrydzewski"  
   --netrc-password "token"  
   --netrc-machine "github.com"  

[1] https://docs.github.com/en/github/authenticating-to-github/keeping-your-account-and-data-secure/creating-a-personal-access-token#using-a-token-on-the-command-line