Pipeline python request header


I am just new in drone. My drone server is set with self-host GOGS.

In my case, I want to test my django project in pipeline and the bearer token is used for authentication by other service.
However, the test progress always fails because of the authentication.

Then, I find out that the header of requests (python packages) is not the one I assigned.
The header is always like the below image

This authorization header exists even if when I do not assign this header.
Therefore, when I decode this token with base64, I find that it is the token of my GOGS account following by “:x-oauth-basic”…

Is there any solution or configuration I can set to solve this problem.


Could you please share your drone yaml file which you are currently using, also checking if you tried passing the token by setting on repo level as below:

Harness support