'If the URL indicated appears to be a repository defined in this
config, return the credential for that repository.'

def find_credential(self, url):

    for (repository, cred) in self.creds_by_repository.items():
        if url.startswith(repository):
            return cred
