Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Installation failure - "Cannot find SourceControlToken with name GitHub" in deployment step #7 #6

Closed
yokawasa opened this issue Oct 29, 2017 · 18 comments
Assignees

Comments

@yokawasa
Copy link
Collaborator

I got the following deployment error in executing deployment step #7

7. Deploy sample media functions into an Azure Functions account

  • TYPE: Microsoft.Web/sites/sourcecontrols
  • RESOURCE ID: /subscriptions/87c7c7f9-0c9f-47d1-a856-1305a0cbfd7a/resourceGroups/RG-aimedia/providers/Microsoft.Web/sites/aimediafuncna22vy36qypii/sourcecontrols/web
  • STATUSMESSAGE:
{
  "Code": "NotFound",
  "Message": "Cannot find SourceControlToken with name GitHub.",
  "Target": null,
  "Details": [
    {
      "Message": "Cannot find SourceControlToken with name GitHub."
    },
    {
      "Code": "NotFound"
    },
    {
      "ErrorEntity": {
        "ExtendedCode": "51004",
        "MessageTemplate": "Cannot find {0} with name {1}.",
        "Parameters": [
          "SourceControlToken",
          "GitHub"
        ],
        "Code": "NotFound",
        "Message": "Cannot find SourceControlToken with name GitHub."
      }
    }
  ],
  "Innererror": null
}

Not sure but looks like additional configuration needed prior to #7 ?

@yokawasa
Copy link
Collaborator Author

@shigeyf Can you please take a look

@shigeyf
Copy link
Owner

shigeyf commented Oct 30, 2017

I have never seen the error before.
Let me check it.
Meanwhile I would ask you to check:
Did you try with your forked repo?

@yokawasa
Copy link
Collaborator Author

Yes, I repro this with my forked repo. After I gave Azure ARM/portal to access Github resource, I didn’t see the error anymore. The procedure needed.

@shigeyf
Copy link
Owner

shigeyf commented Nov 18, 2017

Yes, right. You need to allow Azure Portal to use your Github account token to access Github resources. You will need to add Azure Portal as an Authorized OAuth App in Applications settings of your Github account.
Please confirm if Azure Portal app is registered in your Github Authorized OAuth App in your personal settings of your Github account.
We need to add a documentation to do this registration, since this may not be able to be done in the automation workflow.

@shigeyf shigeyf closed this as completed Nov 18, 2017
@woeterman94
Copy link

Yes, right. You need to allow Azure Portal to use your Github account token to access Github resources. You will need to add Azure Portal as an Authorized OAuth App in Applications settings of your Github account. Please confirm if Azure Portal app is registered in your Github Authorized OAuth App in your personal settings of your Github account. We need to add a documentation to do this registration, since this may not be able to be done in the automation workflow.

Any documentation on how to do this?

@gargabhisar
Copy link

image
Its already authorized, I am still getting the same issue.

@dgsarve
Copy link

dgsarve commented Jan 30, 2023

Same problem i too facing

@woeterman94
Copy link

How I did it:

  • select external git
    image
  • generate a PAT (personal access token) in your Github account. You can do this here.
  • Enter the repository url in the following format:
    https://{github-username}:{access-token}@github.com/{organisation-acount}/{repo}.git

@gargabhisar
Copy link

image
I am not getting "GITHUB External" Option in API App Service.

@mak-thevar
Copy link

This error occurs due to connecting Github to multiple Azure accounts. To resolve it, simply revoke all Azure-related apps from the "Authorized OAuth Apps" section in Github settings (https://github.com/settings/applications), then re-authorize Github in Azure. This should allow you to save the deployment.

@MikaVirkkunen
Copy link

Same problem for me. If I revoke all OAuth apps and try to create the connection through Deployment Center under Functions App it adds the Azure App Service as Authorized OAuth App but portal still gives the error: "Failed to set up deployment: Cannot find SourceControlToken with name GitHub."

@anttikarjalainen
Copy link

@MikaVirkkunen I got it working by disconnecting the github account from deployment center, then opened up the destination (wwwroot/site) in ftps(I used WinScp), transfered some files there and deleted them. Then afterwards I authorized through git and it started working. No idea what happened.

@ph1l1pF
Copy link

ph1l1pF commented Feb 26, 2023

I tried it with another browser and then it worked. Seems to be a browser caching problem

@JulianDeal
Copy link

I tried it with another browser and then it worked. Seems to be a browser caching problem

I can confirm that deleting the browser cache solves the problem.

@SIYEA0405
Copy link

I deleting the browser cache solves the problem.

@paulious83
Copy link

I had azure and git running in chrome but noticed when you select in the development centre to authorize it will load an edge browser window.

closed everything down and restarted the process from Edge and it took two attempts but worked

@Leader254
Copy link

I am getting the same error here

@vpallathu
Copy link

vpallathu commented Jul 25, 2023

I'm getting this error from the template that I generated from Azure for creating Function App resources. I cleared the cookies which did not help. I posted the error in stackoverflow. I'm using Service Principal to create Function App resources.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests