"Resource not accessible by integration" when trying to create trigger - github

This is a very simple question, but after trying to find an answer for 3 hours I am asking, so I apologize if it is a duplicate.
I am trying to add a "Continuous deployment trigger" to my Azure DevOps Pipeline:
But after configuring the Branch Filters and trying to save, I get the following error message:
"GitHub Could not create service hooks subscription Unable to
configure a service on the selected GitHub repository. GitHub returned
the error 'Resource not accessible by integration'. "
My repository is hosted on GitHub and it is private, and so is my project on Azure DevOps
I would expect this to "just work", so I really don't see which other information would be relevant on this question, so apologies in advance in case I forgot to mention something

Through testing, I can reproduce this issue:
The cause of this error could be the selected service connection, when the service connection is to a GitHub-InstallationToken, I got the same error, as shown below:
When I choose the service connection as shown below, everything is normal:
You can check the service connections in the project settings.

Related

Impossible to save pipeline trigger changes in Azure Devops get error message. Bitbucket returned the error 'Forbidden'

I'm working with Azure DevOps to create CI/CD pipeline. The source code is hosted in the Bitbucket server. The problem happened when i want to save changes of the CI/CD pipeline trigger. When i have clicked on the save button, i get the error message:
Unable to configure a service on the selected Bitbucket repository.
Bitbucket returned the error 'Forbidden'.
I saw the 2 pevious answers that appeared for this problem:
Concerning the first one Bitbucket returned the error 'Forbidden:
For my case, i have admin permissions and however, i can't save and received the error message above.
Concerning the second answer Bitbucket always return 'Forbidden'
There is no answer, only a remark that advice to check if we see the setting functionality.
For my case, i see the setting functionality and can change the option.
So I would be very happy if you have an idea to solve my problem.

Azure pipeline error "Git fetch failed with exit code: 128"

I am trying to create a build pipeline in azure devops using this blog:
https://www.linkedin.com/pulse/ci-cd-azure-databricks-using-devops-deepak-rajak.
I have created a service connection with the my repository. I am getting this error and I can't resolve it. I think it is picking the wrong URL.
Error:
As you noted, this error means that the Git repository URL is wrong.
I have created a service connection with the my repository.
You need to correct the repo URL from the service connection. Not sure which Git repository you are using.
However, please note that URL should not be the project URL (e.g https://github.com/xxx/test).
It should be something like this: https://github.com/xxx/test.git
Please control your permission settings in Version Control.
in Azure , project settings >> version control.
select repositories and look security for all git repositories.
"Project collection administrator"

GitHub Could not create service hooks subscription Unable to configure a service on the selected GitHub... Resource not accessible by integration

When I try to update the environment variables on an Azure DevOps release pipeline, I get the error below.
GitHub Could not create service hooks subscription Unable to configure a service on the selected GitHub repository. GitHub returned the error 'Resource not accessible by integration'.
I am an admin on the GitHub repo.
In Get sources, it is currently configured for a GitHub OAuth Service Connection. Another user is able to update the environment variables. I am using GitHub (not enterprise).
Is this an Azure DevOps permission that I do not have?
Is this an Azure DevOps permission that I do not have?
This error message usually comes with GitHub App installation token service connection.
Go Project Settings => Service Connections to check the details of the specific service connection. If your service connection is GitHub App installation token based service connection, then it's expected behavior to meet that issue. Our team are working on adding that support so far, please check this ticket.
Workaround:
1.Create a new service connection with OAuth/PAT method and use it in your pipeline. Since you're admin of the github repo, a Github PAT is more recommended.
2.If you have permission to the service connections and to the pipeline, this issue won't occur. Ask your Azure Devops project admin to via manage security.
After working with ADO tech support, it was discovered that we needed to remove the artifact and trigger definition from the release pipeline, and then re-add it. It is believed that there was cached service connection, and this updated the pointer to the correct service connection.
I was facing a similar issue when attempting to enable CI for a build and found this article and after digging in deeper I discovered that the issue was the actual PAT we created for the automation. What we missed originally was enabling the admin:repo_hook for the repository. This took longer to uncover than it should have, but just wanted to add that, as removing and re-adding things didn't really do anything for us.

Deploy to bluemix failed with "Failed to query status of cloning repository operation."

I'm trying to setup a deploy to Bluemix button for a demo project.
The project has been deploying successfully today, but has now stopped deploying with the error:
"Failed to query status of cloning repository operation.".
See below for a screenshot.
How can I debug this? No other information is provided in the output about the error.
This problems appears to have just been a temporary glitch that has now rectified itself. I'll leave the question and answer on stackoverflow in case this is useful for other users.

Using Azure Powershell or the xpat cli how do I connect my web site to a github hook

Using the portal:
Using the portal at https://manage.windowsazure.com/ this is easy. From a newly created azure web site:
Go to the dashboard
On the quick glance options on the right, click "Set up deployment from source control"
On the "where is your source code?" option, select Github
Authorize, then choose the repo name and branch.
BINGO: now pushes to that branch will trigger a deployment of that branch onto the azure website. Lovely.
Here's the problem:
I cannot for the life of me see how to do this from the command line (using the xpat-cli installed using npm: "npm install azure-cli -g")
It seems like I should be typing something like:
azure site deployment github --verbose --githubusername [username] --githubrepository [username/reponame] [sitename]
Because the help for "azure site deployment github" says it will: "Link a website to a github account for deployment"
Doesn't seem to work though...
If I then type:
azure site show [sitename]
The output says the source control is "LocalGit" instead of github - which is what it says if I do it the portal way above.
Source Control
data: --------------
data: Type: LocalGit
Any ideas?
Depending on your use case the solution will be different.
Assuming you have the same github source but want to deploy to multiple different Azure websites
Potential Solution: Make use of the Deploy to Azure Button See details here: https://azure.microsoft.com/blog/2014/11/13/deploy-to-azure-button-for-azure-websites-2/
Assuming you have various repositories that you want to deploy to Azure: Potential Solution: I am assuming that you will be the person deploying it. The workflow will be as follows:
A. Download files from Github to local folder See here
B. Publish your local folder into a new/existing Azure site. See here, or here. There are other github repositories to get some scripts right away
I understand this doesnt directly hook your system to do direct pull, but its one way to do it.
There is also:
http://www.imtraum.com/blog/streamline-git-with-powershell/
https://gallery.technet.microsoft.com/scriptcenter/a-GitHub-Repository-265c0b49
Both documents I found describing how to set up continuous deployment from GitHub say that you can configure the repo and branch with an Azure Resource Manager template, but you have to enter your credentials and complete the authorization process in the portal.
The script used in this tutorial will automatically configure
continuous publishing from your GitHub repository. This requires that
your GitHub credentials are already stored in Azure, otherwise the
scripted deployment will fail when attempting to configure source
control settings for the web apps.
To store your GitHub credentials in Azure, create a web app in the
Azure preview portal and configure GitHub deployment. You only need to
do this once.
I'd also suggest posting your xpat-cli problem as an issue on their GitHub repo.