def METHOD_NAME(testrepo):
    class MyCallbacks(pygit2.RemoteCallbacks):
        def credentials(testrepo, url, username, allowed):
            assert allowed & pygit2.GIT_CREDENTIAL_USERPASS_PLAINTEXT
            return Keypair("git", "foo.pub", "foo", "sekkrit")
    url = "https://github.com/github/github"
    remote = testrepo.remotes.create("github", url)
    with pytest.raises(TypeError): remote.fetch(callbacks=MyCallbacks())