简体   繁体   English

AWS通过SSH提取2个私有git仓库

[英]AWS pulling 2 private git repos via SSH

I have an EC2 instance that needs two private git repos to run my app. 我有一个需要两个私有git repos才能运行我的应用程序的EC2实例。 Currently, I have my python app grabbing one repo with SSH (public key is on server and added as a deploy key on github). 当前,我有我的python应用程序使用SSH抓取一个存储库(公共密钥在服务器上,并作为部署密钥添加到github上)。 Problem is I cant use the same public key as the other Deploy Key - github requires unique deploy keys. 问题是我不能使用与其他部署密钥相同的公共密钥-github需要唯一的部署密钥。 How can I configure the ec2 instance to use to key pairs or perhaps there is another way? 如何配置ec2实例以用于密钥对,或者还有另一种方法?

You could generate a personal access token for your git hub account that would act like a password. 您可以为您的git hub帐户生成一个个人访问令牌,该令牌的作用类似于密码。

https://help.github.com/articles/creating-an-access-token-for-command-line-use/ https://help.github.com/articles/creating-an-access-token-for-command-line-use/

You can generate as many of these as you like and when you create it you can limit the scope of what the token allows the holder to do. 您可以根据需要生成任意数量的令牌,并且在创建令牌时可以限制令牌允许持有者执行的操作范围。

https://developer.github.com/v3/oauth/#scopes https://developer.github.com/v3/oauth/#scopes

You can then clone your repo using HTTPS, 然后,您可以使用HTTPS克隆存储库,

https://help.github.com/articles/which-remote-url-should-i-use/#cloning-with-https-recommended https://help.github.com/articles/which-remote-url-should-i-use/#cloning-with-https-recommended

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM