Enable SSO and authorization option not found for either SSH keys and Personal Access Token

Hello Community, I am trying to build Hugo Website and deploy using Github Actions to push to another repo under my name with github.io. the problem is that even upon adding the Personal access token to repo’s secrets, I am not able to push to the external repo, as the the error says,

Action failed with "The generated GITHUB_TOKEN (github_token) does not support to push to an external repository. Use deploy_key or personal_token. ".

I stumbled upon this Stackoverflow answer, but to my notice, option to enable and authorize SSO to PAT seems to be missing.

Any help possible?

HI @adhadse, welcome

Authorizing a personal access token for use with SAML single sign-on is documented here:
authorizing-a-personal-access-token-for-use-with-saml-single-sign-on.

HOWEVER this is only relevant if your Organization is configured for SSO to an IdP, which is not an available feature for user repositories or free plan Organizations. You will know if SAML is enabled for your organization as you have to provide IdP credentials in addition to your GitHub login credentials when accessing any organization repositories.

I am not overly familiar with actions, but the message you pasted states ‘The generated GITHUB_TOKEN (github_token) does not support to push to an external repository’. This implies the personal access token you created is not being used or configured correctly in your action code.

You can probably look around and find an example that you could follow to correct this problem, or another helpful community member may post a link.
I think you will need to specify the created personal access token secrets in the push to the external repository and not the default GITHUB_TON created by the workflow action, that does not have permission on external repositories

1 Like

Well thanks for the your valuable reply and concern. My problem got fixed, I was typing github_token: ${{ secrets.token )) instead of personal_token: ${{ secrets.token }}. Should Have read the docs prior to this.

@adhadse great news :slight_smile:
if you mark the post as solution, it will be clearer for anyone looking searching for the same problem

Good luck with your website and action deployments.

So, does it mean it’s impossible to use the automatically generated GITHUB_TOKEN secret in orgs where SAML SSO is enabled?