Gitolite + Pygit2

15 views
Skip to first unread message

Hello Puyup

unread,
Dec 13, 2021, 10:09:19 PM12/13/21
to gitolite
I have done with all GItolite setting and now running well. All features work great such as clone and push.

Someday I try Pygit2 and use like this to clone a repo.

# START CODE SAMPLE
pub_key = os.path.join('/home/bob', '.ssh', 'id_rsa.pub')
prv_key = os.path.join('/home/bob', '.ssh', 'id_rsa')

#print("Cloning pygit2 over ssh")
# pygit2.clone_repository("ssh://scm.tombolajaib.com/git/wordpress.git", "pygit2.git",
#                        callbacks=MyRemoteCallbacks())

print("Cloning pygit2 over ssh with the username in the URL")
keypair = pygit2.Keypair("git", pub_key, prv_key, "")
callbacks = pygit2.RemoteCallbacks(credentials=keypair)
print(callbacks)
pygit2.clone_repository("ssh://g...@scm.tombolajaib.com/git/wordpress", "pygit2.git",
                                                callbacks=callbacks)
# END CODE SAMPLE

When I ran that return `FATAL: R any git/wordpress bob DENIED by fallthru
(or you mis-spelled the reponame)`

But when I ran with bob use in my local computer gitolite working fine (can clone and push)

What wrong?
Reply all
Reply to author
Forward
0 new messages