Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Automatically convert SSH2 public keys to OpenSSH format #798

Closed
rojaro opened this issue Dec 29, 2014 · 2 comments
Closed

Automatically convert SSH2 public keys to OpenSSH format #798

rojaro opened this issue Dec 29, 2014 · 2 comments
Labels
🔨 enhancement Make it better, faster

Comments

@rojaro
Copy link
Contributor

rojaro commented Dec 29, 2014

To use a SSH2 public key with gogs one has to convert it to the OpenSSH format first i.e. through ssh-keygen

ssh-keygen -i -f ssh2.pub > openssh.pub

It would be useful to automatically convert these keys into the OpenSSH format so a windows user doesnt have to do that.

As the conversion is pretty simple (basically just string manipulation), this could be done without using ssh-keygen within gogs. To test this, you can create a SSH2 public key from your existing OpenSSH key using

ssh-keygen -e -f openssh.pub > ssh2.pub
@unknwon
Copy link
Member

unknwon commented Jan 2, 2015

Sounds not bad. But how does Gogs know user is giving SSH2 or SSH public key?

@unknwon unknwon added the 🔨 enhancement Make it better, faster label Jan 2, 2015
psmit added a commit to psmit/gogs that referenced this issue Jan 2, 2015
It is now possible to input ssh keys in a number of formats: openssh, SSH2 or just the base64 encoded key.
unknwon added a commit that referenced this issue Jan 22, 2015
Implement #798 Flexible ssh-key input
@unknwon unknwon added this to the 0.8.0 milestone Nov 15, 2015
@unknwon
Copy link
Member

unknwon commented Nov 15, 2015

Please follow on #1877 now :D

@unknwon unknwon closed this as completed Nov 15, 2015
@unknwon unknwon removed this from the 0.8.0 milestone Nov 15, 2015
ethantkoenig pushed a commit to ethantkoenig/gogs that referenced this issue Feb 11, 2017
* Allow using custom time format

I need to use custom time format in `conf/app.ini' like 

    FORMAT = 2006-01-02 15:04:05

so that Gitea will display '2017-01-30 08:41:49'
check this answer for more constants to format date  <http://stackoverflow.com/a/20234207/2570425> 

PS: First GO commit

* Refactor and validate TimeFormat (must have 2006, 01, 02, 15, 04 and 05)
@github-actions github-actions bot locked as resolved and limited conversation to collaborators May 12, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
🔨 enhancement Make it better, faster
Projects
None yet
Development

No branches or pull requests

2 participants