Does Gitea support authentication via http.extraheader?

I’m building my golang image and I need to import private repositories in my code, now I can’t import and pull private repositories when I build the image, so is there any way to solve this problem?
I can’t use SSH because I have disabled it.

I have resolved it.

git config --global http.https://yourdomain/.extraheader "AUTHORIZATION: basic $(echo -n "x-access-token:${{ secrets.BOT_TOKEN }}" | base64)"
1 Like