Github公钥的公共URL是什么? [英] What is the public URL for the Github public keys

查看:313
本文介绍了Github公钥的公共URL是什么?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我听说github上的所有用户都有一个公共URL,您可以访问他们的公钥,或者他们可以提供所有公钥的URL。这是真的?如果是这个网址是什么。它还存在于bitbucket中吗?

I heard that there was a public URL for all users on github where you can access their public keys or they can supply that URL of all their public keys. Is this true? If so what is that URL. Does it exist for bitbucket as well?

推荐答案

您可以得到:

curl https://github.com/<username>.keys

<用户名> 替换为GitHub用户的实际用户名。

Replace <username> with the actual username of the GitHub user.

当您将登录权限设置为其他服务器时很有用。只需将其输出保存到〜/ .ssh / authorized_keys 中即可。从命令行追加到最后:

This is useful when you set login permission to other servers. Just save its output into ~/.ssh/authorized_keys. To append it to the end from the command line:

curl https://github.com/<username>.keys | tee -a ~/.ssh/authorized_keys

也可以使用Github API完成

It can also be done using Github API

curl -i https://api.github.com/users/<username>/keys

对于位桶,您可以使用以下内容:

For bit bucket you can use the following

curl -i https://bitbucket.org/api/1.0/users/<username>/ssh-keys

这篇关于Github公钥的公共URL是什么?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆