'Svn branch identify issue in python script

In shell when I use the below command it returns me the result.

/volume/buildtools/bin/svn --non-interactive --trust-server-cert --username neha --password negisvn info svn+ssh://test-svn.ista.net/allhere/branches/NEHA_NEGI

Result:

Path: NEHA_NEGI
URL: svn+ssh://test-svn.ista.net/allhere/branches/NEHA_NEGI
Relative URL: ^/branches/NEHA_NEGI
Repository Root: svn+ssh://test-svn.ista.net/allhere/junos-2009
Repository UUID: aff7b9c9-8b30-4cec-ba46-ed8sefb130c1
Revision: 13123131
Node Kind: directory
Last Changed Author: Neha
Last Changed Rev: 13123132
Last Changed Date: 2022-02-04 12:26:59

But when I use the same command with python script it is returning me the error. I don't know why it is happening. can anyone please help me?

Error:

ssh-agent is empty; use ssh-add to load your key(s)!

Python code:

def svn_check(request):
   url ='/volume/buildtools/bin/svn --non-interactive --trust-server-cert --username neha --password negisvn info svn+ssh://test-svn.ista.net/allhere/branches/NEHA_NEGI'
   output, message  = subprocess.getstatusoutput(url)
   print("CMD : " + str(url))
   print("Message : " + str(message))
   print("Return Code : " + str(output_br))
   return HttpResponse(output_br)


Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source