簡體   English   中英

如何使用ssh為bitbucket / github從私人倉庫下載文件?

[英]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的限制,你必須使用公共repo並使用私人repo用基本auth和交叉手指發出你的密碼。

從2009年開始 ,下載功能被描述為:

如果存儲庫是私有的,則下載文件的URL看起來會有所不同(它將包含一個24小時有效的身份驗證令牌),

您不能將ssh與用戶名/密碼一起使用,因為您在遠程服務器上沒有帳戶(只有'git'有一個帳戶)。

您可以在“將構建工件部署到Bitbucket下載 ”中查看下載過程

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM