In case you need to download mods, use gopls with mods from a private repo you could use this setup. Ideally you want to have a proper ssh-config, this is how to get it done over https
Inside ~/.gitconfig
[url "https://{{your_user}}:{{access_token}}@github.com/{{repo_owner}}"]
insteadOf = https://github.com/{{repo_owner}}