Search code examples
gitazure-devopsrepositorypandoc

Pandoc basic HTTP authentication


I'd like to use Pandoc to periodically convert a markdown file into a Word document. The .md file and the embedded images are located in a protected Git repository in Azure DevOps.

I tried the following but it just dumps the Azure DevOps sign in website HTML into the .docx file.

pandoc -f markdown https://company.visualstudio.com/projectname/_git/project.wiki?path=%2Fdirecotry%2Finput.md
-o test.docx

Is there a way to use basic HTTP authentication with Pandoc to access the markdown file?


Solution

  • You could clone the repo locally, and then run pandoc command on the local markdown file. When you run git clone command, it will pop up the windows to let you login DevOps.