-
Notifications
You must be signed in to change notification settings - Fork 33
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
Add support of push and pull over ssh #303
Conversation
sonalkr132
commented
Jul 18, 2015
- add keys model
- add fingerprint to keys
- changes in UI to allow users to add keys
- integrate gitlab-shell
- add api for shell to use
- customize shell so that it authenticates using api
- tests for keys
- tests for api
- test for lib files
git shell(customized version of gitlab-shell) will use keys for authorization before git pull and push. Users can add multiple keys to their accounts.
c2ccf9b
to
ad45ec2
Compare
Keys' form is added to same page as index. Moved aside bar on user settings page to a partial. A few changes in style to set active class.
A few gotchas: Make sure username and path in gitlab-shell config matches the username used for hosting. If using fedora install ruby with `yum/dnf install ruby` even if you have ruby gem avilable. Make sure you have access rights to ~/.ssh/authorized_keys.
gitlab-shell makes call to api of gg app for verification of access during push and pull. Make sure that api is working with ./bin/check from gitlab-shell. We don't have same directory structure as gitlab, so directory test will fail. We don't use redis either so it will fail too. Gotcha: Generate a secure random key and add it to .gitlab_shell_secret in gitlab-shell root folder.
Create branch and remotes in satellite repo after push to empty repo is made.Added symlink to hooks dir in gitlab-shell/hooks in each project's bare repo. There hooks make call to gg api and inforce authorization. ShellEnv passes user-id to gitlab-shell.
Sync of satellite and authorization from hooks required mulitple processes to run concurrently.
post-recieve hook makes api call for sync
…ands GitAccess checks membership relationship of user with projects. GitAccessStatus builds the response to be send.
93ea9fb
to
0ec5f7d
Compare
Puma required that we use 4 workers while unicorn needs only 2. Feel free to bump this number to CPU+1 To start the server use in development mode: RAILS_ENV=development bundle exec unicorn -c config/unicorn.rb
@rohitpaulk I have a few concerns about test, especially about getting travis to work. This branch depends heavily on environment outside of app. For ex: to test successful creation of keys, I need a OpenSSH server set up for generation of fingerprint. |
Add shoulda-matcher for easier validation checking. Removed project method from keys model cause we are not using it. Stub callback methods of keys model to save hassel.
aeae7cf
to
91ba245
Compare
behold: http://glittergallery-dev.fedorainfracloud.org/
Known issues:
Please report any other issue you come across. |
Add support of push and pull over ssh