ssh keys publically available for sysadmins via http, the github way
Created by: devaroop
Very helpful feature for sysadmins to get user ssh-keys and append in servers. For example:
http://github.com/devaroop.keys
After this merge, gitlab users will be able to use it the same way:
http://<gitlab_host>/<username>.keys
More information about its advantages: http://thechangelog.com/github-exposes-public-ssh-keys-for-its-users/
Duplicates: #5260 which is closed
Created by: devaroop
@jvanbaarsen - The reason for it to be public is to cater sysadmins do a wget / curl and append it to the ssh keys file. GitHub implements it the same way. Try: https://github.com/jvanbaarsen.keys without logging in.
@randx - Kindly re-trigger the travis build, it choked because of a connection timeout. :(
By Administrator on 2013-10-03T18:18:55 (imported from GitLab project)
Created by: devaroop
@randx : Agreed. API certainly provides the functionality. It provides additional information for the keys like id, description, etc., BUT at the cost of user authentication(private token).
The whole point here is to help sysadmin's get the keys without asking the end user / authenticate / use any API. This feature in GitHub was very helpful and we wanted it on GitLab too. It helps a lot.
By Administrator on 2013-10-05T10:00:35 (imported from GitLab project)
Created by: devaroop
@jvanbaarsen : True. Its for robust private hosting. But what mischief can someone do by sneaking others ssh-public-keys? It is not reversible to get its priv key, moreover, if he uses them in his server, he is digging his own grave :).
By Administrator on 2013-10-05T10:30:23 (imported from GitLab project)
Created by: dosire
I think this functionality is scary on first sight but makes a lot of sense. In many companies it is very hard to find the public keys of your other team members. It would be very nice if you can find them in GitLab. All the user profiles should contain a link to http://<gitlab_host>/.keys
By Administrator on 2013-12-04T09:22:24 (imported from GitLab project)
Created by: dosire
We like this functionality and would so like to see the following:
- The keys should be available to anyone without authentication.
- When keys are added to GitLab they should be stripped of any comments before performing validation and storing in the database. People can use the existing key title to identify the key.
By Administrator on 2013-12-05T08:20:33 (imported from GitLab project)
Created by: devaroop
@jvanbaarsen , @dosire :
- The keys should be available to anyone without authentication.
A) Yes the keys are available to anyone without authentication.
- When keys are added to GitLab they should be stripped of any comments before performing validation and storing in the database. People can use the existing key title to identify the key.
A) The current feature does not change anything on how the keys are inserted, it just fetches what is in the db and shows it to the user in plain text. Just like: https://github.com/devaroop.keys or https://github.com/dosire.keys
By Administrator on 2014-01-30T06:05:56 (imported from GitLab project)
32 33 format.js { render nothing: true } 33 34 end 34 35 end 36 37 # Get all keys of a user(params[:username]) in a text format 32 33 format.js { render nothing: true } 33 34 end 34 35 end 36 37 # Get all keys of a user(params[:username]) in a text format 38 # Helpful for sysadmins to put in respective servers 39 def get_keys 40 if params[:username].present? 41 begin 42 user = User.find_by_username(params[:username]) 43 if user.present? 435 435 def short_website_url 436 436 website_url.gsub(/https?:\/\//, '') 437 437 end 438 439 def all_ssh_keys 440 keys.map(&:key) Created by: dzaporozhets
please follow https://github.com/bbatsov/ruby-style-guide
By Administrator on 2014-02-11T15:42:44 (imported from GitLab project)
32 33 format.js { render nothing: true } 33 34 end 34 35 end 36 37 # Get all keys of a user(params[:username]) in a text format 38 # Helpful for sysadmins to put in respective servers 39 def get_keys 40 if params[:username].present? 41 begin 42 user = User.find_by_username(params[:username]) 43 if user.present? 32 33 format.js { render nothing: true } 33 34 end 34 35 end 36 37 # Get all keys of a user(params[:username]) in a text format 38 # Helpful for sysadmins to put in respective servers 39 def get_keys 40 if params[:username].present? 41 begin 42 user = User.find_by_username(params[:username]) 43 if user.present?