Forum Discussion
Github PAT token not found
The same PAT working when supplied in the session suggests the token itself is not the problem. A missing .git-credentials file means the terminal Git process did not receive the connector credential; the identity sidecar or managed identity handles Azure access, not direct GitHub authentication.
In SRE Agent Builder > Code Access, reopen Add repositories and reauthenticate the GitHub connection. OAuth is recommended. If a PAT is required, update it there (or use srectl repo add github --pat) with repo scope, reselect the repository, and start a fresh chat. Microsoft’s documentation also notes that older connector setups may need one reauthentication.
Test in two steps: ask the agent to read a file or list a branch, then create the branch/PR. If reading works but push still searches for .git-credentials, do not paste the PAT into chat. Capture the agent/run ID, timestamp, repository host, and error, then open an Azure support case; that points to a connector-to-terminal credential handoff defect.