Authenticate DVC python api with GitHub app credentials

Hi Folks,

I am trying to use dvc python api which refers to private GitHub repo.

dvc.api.get_url(
    path='data/data.json',
    repo='https://github.com/owner/private-repo.git'
)

Without any credentials I get dulwich.client.HTTPUnauthorized: No valid credentials provided error.

I have registered Github app and want to use credentials of same to do some operations using python api. Can someone help me with how do we provide credentials to dvc python api?

Hello @Harshad!
Do you have an ssh access to the repo?
Replacing https address with git address might help. In your case it could be:
repo='https://github.com/owner/private-repo.git'repo=git@github.com:owner/private-repo.git