2017-03-06 57 views
0

我是新来的Git和Python,我试图做:“混帐推起源大师”在德威

git push origin master using Dulwich 

我克隆了一个远程仓库到本地回购“local_repo”,然后试图做一些事情像:

porcelain.push(local_repo,'git://github.com/myusername/myrepo') 

,并显示错误:

"dulwich.errors.GitProtocolError: You can't push to git://github.com/myusername/myrepo Use https://github.com/myusername/myrepo.git" 

当我使用:

porcelain.push(local_repo,'https://github.com/myusername/myrepo.git') 

它显示错误:

"dulwich.errors.GitProtocolError: unexpected http response 401" 

请告诉我,我怎么去了解它

+2

您需要为请求通过提供适当的身份验证参数。 '401'代表无效认证。 –

回答

0

你不能推到仓库,你没有必要的权限。

git clone https://username:[email protected]/username/repository.git 

我虽然使用GitHub的SSH密钥:如果你喜欢,你可以通过ceredentials作为URL的一部分。

编辑:它似乎像瓷器有一个私人存储库工作的错误。我在这里打开了一个问题:https://github.com/jelmer/dulwich/issues/507

+0

你能告诉我们如何使用德威公司做到这一点? – Keats