Tuesday, July 30, 2024

Azure DevOps Unable to Edit Wiki

I recently discovered project-wide repository policies in Azure DevOps so naturally I took advantage of them. The next time I tried to update the wiki in that project I was met with an error that read "Pushes to this branch is not permitted. Please continue with 'Edit in Repos' and use a pull request to update this branch. Click on 'Learn More' to find out how to edit in Repos."

A quick Google search lead me to a Microsoft "answer" that at least explained what was happening, but didn't give me any insight on how to fix it. Fortunately, the next search result did. Since that's just someone's blog and I have no guarantee they'll keep it up forever, I'm just going to reproduce their information here.

Instead, you can apply a security exception.  To do this you go to the Wiki home page and edit the "Wiki security", accessed through the menu for the wiki.

Here you have the same permissions dialogue you'd find against a repository.  Find an appropriate group (Contributors makes sense, but you might want to allow other users too), and then grant "Bypass policies when pushing" flag for that group.