如何使用 bitbucket/github 的 ssh 从私有存储库下载文件?
How can I download files from a private repo with ssh for bitbucket/github?
我查看了文档,但在任何地方都找不到有关如何实现这一点的示例。
这个问题与 有关,因为我想分发更新,但只分发给那些拥有 ssh 密钥而不是使用简单身份验证的更新。
它的工作原理是查看 versions.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 的限制,您必须使用 public 存储库并使用私人存储库提供您的基本身份验证和密码交叉手指。
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),
您不能通过 username/password 使用 ssh,因为您在远程服务器上没有帐户(只有 'git' 有一个)。
中看到一个下载过程
我查看了文档,但在任何地方都找不到有关如何实现这一点的示例。
这个问题与
它的工作原理是查看 versions.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 的限制,您必须使用 public 存储库并使用私人存储库提供您的基本身份验证和密码交叉手指。
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),
您不能通过 username/password 使用 ssh,因为您在远程服务器上没有帐户(只有 'git' 有一个)。
中看到一个下载过程