Hiya
For pipeline 1 in particular, did you set up/mount the `.git-credentials` in the kubernetes elastic agent profile (its podspec in particular) and test on an agent?
If the pipeline triggers and shows the "changes" in the dropdown, your GoCD Server can clone repos to detect changes and trigger builds, and is probably fine. If it starts but the issue is in the log for the build, then the problem is likely on the agent.
But if the GoCD Server code isn't configured with the username/password, it can't distribute them to the agents that need them. So you'd need to configure the elastic agents somehow to model whatever server configuration you've done, e.g by mounting part of a ConfigMap or running some pre-start script somehow.
This is why most folks that want to use username/pass will configure it via GoCD server, to avoid manual agent configuration and hacking.
I'm not sure what is wrong with "pipeline 2" (are you sure you configured username and password inside GoCD correctly with something GitHub supports, such as a personal access token linked to an account with read access to the relevant repo?). I've also never personally tried to use GoCD with a Git credential helper or OAuth2, so I don't know the details of how it works.
-Chad