如何使用ssh for bitbucket/github从私有回购下载文件?

2024-09-29 19:29:28 发布

您现在位置:Python中文网/ 问答频道 /正文

我查阅了文档,但没有找到任何可以实现这一目标的例子。在

这个问题与this有关,因为我想分发更新,但只分发给那些有ssh密钥而不是使用简单身份验证的更新。在

它的工作原理是版本.gz文件,然后获取最新下载。ssH有可能吗?在

import paramiko
ssh = paramiko.SSHClient()
ssh.set_missing_host_key_policy(paramiko.AutoAddPolicy())
##ssh://git@bitbucket.org/Tysondogerz/ssh/downloads
ssh.connect('104.192.143.2', 8080, username='https://bitbucket.org/Tysondogerz/ssh/downloads/', password="", key_filename='C:\\Users\\Django\\.ssh\\id_rsa')
#TimeoutError: [WinError 10060] A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond

有没有一种方法可以验证其他人从我的存储库下载更新,或者这只是bitbucket的一个限制,而且您必须使用公共回购和私有回购,通过基本身份验证和交叉手指来给出您的密码。在


Tags: key文档org身份验证hostparamikobitbucketdownloads
1条回答
网友
1楼 · 发布于 2024-09-29 19:29:28

Right from 2009,下载功能描述为:

If a repository is private, the URL for downloading a file will look a bit different (it will include an authentication token that is good for 24 hours),

您不能使用带有用户名/密码的ssh,因为您在远程服务器上没有帐户(只有'git'有一个帐户)。在

您可以在“Deploy build artifacts to Bitbucket Downloads”中看到下载过程

相关问题 更多 >

    热门问题