I have started build automation using vs team service. I have linked my github repositories with Visual Studio Team Services through personal access token.
Now I am able to select github repositories in Visual Studio Team Services. But while saving build definitions it is giving following error:
Unable to configure a service on the selected GitHub repository. This is likely caused by not having the necessary permission to manage hooks for the selected repository.
Can anyone please help me how to resolve this error. Do we need to buy any service for build automation?
Thanks in advance.
There's another situation that also provokes this issue, specifically related to configuring the Continuous Integration trigger.
I have a github account with my own repos, but I'm also a collaborator on a different project (which is a personnel not an organization repo).
GH allows me to create a personal access token and VSO considers it valid for use when configuring the Repository options on the build definition but it does not have the appropriate rights to create a Continuous Integration trigger acting as collaborator to the other private repo.
The reason is that triggering notification is performed using GitHub Web Hooks. It appears that when first creating the CI trigger, VSO initiates a request into the GH API to subscribe to the push
event for the requested repo ... except that the personal access token includes the admin:repo_hook
right for your own repo(s), not any for which you are a collaborator as this right cannot be delegated for a personal account.
It took me a bit of experimentation to figure this out. 8-}
Within this context, I think there are two possible solutions:
HTH.
You can only build the github repositories hosted in VS Team Service which you are authorized to push to.
Two ways:
On the Repository tab, next to the Connection drop-down, click the Manage link. The Services tab opens as a new tab in your browser.
a.Click New Service Endpoint and choose GitHub.
b.In the Add New GitHub Service Connection dialog box, select Grant authorization, and then click Authorize.
c.In the new browser window, sign in to GitHub and follow the instructions to authorize Visual Studio Team Services to access your GitHub account.
On the Repository tab, select the Connection you created.
Select the Repository that contains the code you want to build.
In GitHub, create an access token.
a.Select the repo, user, and admin:repo_hook scopes.
b.Copy the token to your clipboard.
Sign on to Team Services and create a build definition.
On the Repository tab, next to the Connection drop-down, click the Manage link. The Services tab opens as a new tab in your browser.
a.Click New Service Endpoint and choose GitHub.
b.In the Add New GitHub Service Connection dialog box, select Personal access token.
c.Paste the token and give the connection a name.
On the Repository tab, select the Connection you created.
Select the Repository that contains the code you want to build.
More details you can refer the link from MSDN: Specify the repository - GitHub
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With