Azure Runbook git clone in PowerShell script

Jan Tichava 45 Reputation points
2023-11-10T21:23:15.57+00:00

Hello everybody,

is it possible to use git in Runbook in Automation Accounts?

I'd like to create Runbook that automatically backs up git repositories in Azure DevOps to blob Storage.

Obviously git is not installed and my question is - is it possible to install it somehow?

----------- Job Status: Completed-------------
---------------  Output ----------------
Error: git : The term 'git' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the  spelling of the name, or if a path was included, verify that the path is correct and try again.
At line:1 char:1 
+ git status 
+ ~~~ 
    + CategoryInfo          : ObjectNotFound: (git:String) [], CommandNotFoundException 
    + FullyQualifiedErrorId : CommandNotFoundException    

I'm expecting negative answer, but I wanted to ask anyway :-)

Thank you very much in advance.

Best regards,

Jan

Azure Automation
Azure Automation
An Azure service that is used to automate, configure, and install updates across hybrid environments.
1,366 questions
Windows for business Windows Server User experience PowerShell
{count} votes

Accepted answer
  1. SwathiDhanwada-MSFT 18,996 Reputation points Moderator
    2023-11-15T12:11:01.56+00:00

    Jan Tichava Thanks for your question. As of now, Azure Automation doesn't support the execution of git commands within runbooks. For your requirement, you can use Powershell commands to get the data from Azure DevOps repository and back it up to Azure Storage account.

    Here are some reference document to get you started with


0 additional answers

Sort by: Most helpful

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.