Possibility to download SSH public keys from an account. #12364

Closed
opened 2025-11-02 10:07:16 -06:00 by GiteaMirror · 3 comments
Owner

Originally created by @bencurio on GitHub (Jan 21, 2024).

Feature Description

GitHub provides an option to download the SSH public keys from an account.

Example:

$ curl https://github.com/{username}.keys
ssh-rsa AAAAB3[...]tsVstaqw==
ssh-rsa AAAAB3[...]vF87AVw==

Use case: Ansible

---
- name: Set authorized keys taken from url using lookup
  ansible.posix.authorized_key:
    user: {username}
    state: present
    key: "{{ lookup('url', 'https://github.com/{username}.keys', split_lines=False) }}"

Screenshots

No response

Originally created by @bencurio on GitHub (Jan 21, 2024). ### Feature Description GitHub provides an option to download the SSH public keys from an account. Example: ```bash $ curl https://github.com/{username}.keys ssh-rsa AAAAB3[...]tsVstaqw== ssh-rsa AAAAB3[...]vF87AVw== ``` Use case: Ansible ```yaml --- - name: Set authorized keys taken from url using lookup ansible.posix.authorized_key: user: {username} state: present key: "{{ lookup('url', 'https://github.com/{username}.keys', split_lines=False) }}" ``` ### Screenshots _No response_
GiteaMirror added the type/proposal label 2025-11-02 10:07:16 -06:00
Author
Owner

@jolheiser commented on GitHub (Jan 21, 2024):

This is already possible using the same format.

https://try.gitea.io/jolheiser.keys

@jolheiser commented on GitHub (Jan 21, 2024): This is already possible using the same format. https://try.gitea.io/jolheiser.keys
Author
Owner

@bencurio commented on GitHub (Jan 21, 2024):

This is true! I was misled by the fact that the profile visibility was limited, and as a result, I got Error 404.

@bencurio commented on GitHub (Jan 21, 2024): This is true! I was misled by the fact that the profile visibility was limited, and as a result, I got Error 404.
Author
Owner

@github-actions[bot] commented on GitHub (Feb 29, 2024):

Automatically locked because of our CONTRIBUTING guidelines

@github-actions[bot] commented on GitHub (Feb 29, 2024): Automatically locked because of our [CONTRIBUTING guidelines](https://github.com/go-gitea/gitea/blob/main/CONTRIBUTING.md#issue-locking)
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/gitea#12364