3
votes

I'm using libgit2sharp and I'd like to be able to test the connection to a specific repository providing its URL and a username/password. So far, I've only been able to do this by cloning the repository but I don't want the files to be retrieved, I just want to see if the information provided can be used to connect to the repo.

1

1 Answers

3
votes

Would you only want to test the connectivity, I believe the quickest way would be to use the static Repository.ListRemoteReferences() method.

This will retrieve the list of known references from the remote repositories, leveraging the whole network stack.

An override allows you to pass in your credentials (for private repositories, for instance).