summaryrefslogtreecommitdiff
path: root/lib/gitlab_net.rb
Commit message (Collapse)AuthorAgeFilesLines
* Refactor repository paths handling to allow multiple git mount pointsshardsAlejandro Rodríguez2016-06-291-1/+1
|
* Put Redis loading code in one placegitlab-redisJacob Vosmaer2016-06-231-1/+1
|
* Put redis library in lib/vendor/ and adjust LOAD_PATHuse-redis-rb-clientStan Hu2016-05-121-1/+1
|
* Add redis-rb as a vendored libraryStan Hu2016-05-121-1/+1
| | | | `make update-redis` will clone the library and adjust the paths properly
* Use Redis Ruby client instead of shelling out to redis-cliStan Hu2016-05-121-0/+19
| | | | Closes gitlab-org/gitlab-ce#17329
* Add encoding for the ssh key on the urlPablo Carranza2016-03-241-1/+1
|
* Change use of fingerprint for whole keyPablo Carranza2016-03-241-2/+2
|
* Change API endpoint to authorized_keysPablo Carranza2016-03-241-1/+1
|
* Add authorized keys bin script to find keys by fingerprintPablo Carranza2016-03-241-2/+4
|
* Add ssh-key resource get to gitlab_netPablo Carranza2016-03-241-0/+5
| | | | | This provides the integration point to the internal API to get the ssh key from the internal API.
* Actually use the read_timeout config optionJacob Vosmaer2016-02-091-1/+5
|
* Log duration of HTTP API requestsnet-read-timeoutJacob Vosmaer2016-02-091-0/+5
|
* Use an HTTP timeout of 5 minutes by defaultJacob Vosmaer2016-02-091-6/+11
|
* Add support to connect gitlab-shell to Unicorn via UNIX socketKirill Smelkov2015-11-101-1/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | It is well known that UNIX sockets are faster than TCP over loopback. E.g. on my machine according to lmbench[1] they have ~ 2 times lower latency and ~ 2-3 times more throughput compared to TCP over loopback: *Local* Communication latencies in microseconds - smaller is better --------------------------------------------------------------------- Host OS 2p/0K Pipe AF UDP RPC/ TCP RPC/ TCP ctxsw UNIX UDP TCP conn --------- ------------- ----- ----- ---- ----- ----- ----- ----- ---- teco Linux 4.2.0-1 13.8 29.2 26.8 45.0 47.9 48.5 55.5 45. *Local* Communication bandwidths in MB/s - bigger is better ----------------------------------------------------------------------------- Host OS Pipe AF TCP File Mmap Bcopy Bcopy Mem Mem UNIX reread reread (libc) (hand) read write --------- ------------- ---- ---- ---- ------ ------ ------ ------ ---- ----- teco Linux 4.2.0-1 1084 4353 1493 2329.1 3720.7 1613.8 1109.2 3402 1404. The same ratio usually holds for servers. Also UNIX sockets, since they reside on filesystem, besides being faster with less latency, have one another nice property: access permissions to them are managed the same way access to files is. Because of lower latencies and higher throughput - for performance reasons, and for easier security, it makes sense to interconnect services on one machine via UNIX sockets and talk via TCP only to outside world. All internal services inside GitLab can talk to each other via UNIX socket already and only gitlab-shell was missing support to talk to Unicorn via UNIX socket. Let's teach gitlab-shell to talk via UNIX sockets. [1] http://www.bitmover.com/lmbench/ ~~~~ In this patch we - add URI::HTTPUNIX to handle http+unix:// URI scheme - add Net::HTTPUNIX to handle "connect via unix socket and then talk http" - adjust GitlabNet#http_client_for() accordingly - adjust documentation in config.yml.example The http+unix:// scheme is not reinvented anew: the idea about its structure is quite logical an was already established at least in requests-unixsocket python package: http://fixall.online/theres-no-need-to-reinvent-the-wheelhttpsgithubcommsabramorequests-unixsocketurl/241810/ https://github.com/msabramo/requests-unixsocket
* Merge pull request #212 from jirutka/patch-1Dmitriy Zaporozhets2015-04-101-1/+1
|\ | | | | Allow to configure location of the secret file
| * Allow to configure location of the secret fileJakub Jirutka2015-02-081-1/+1
| |
* | Improve broadcast message logicv2.5.1Dmitriy Zaporozhets2015-02-181-7/+3
| | | | | | | | | | Expect broadcast message API endpoint to return 200 with empty JSON if no broadcast messages available
* | Log full Net::HTTP error.Douwe Maan2015-02-121-1/+2
| |
* | Show nice error message when internal API is unreachable.Douwe Maan2015-02-111-1/+7
| |
* | Refactor: Remove #tap for readability and performance and DRY up get/post.Douwe Maan2015-02-111-40/+40
| |
* | Print broadcast message if one is available.Douwe Maan2015-02-091-0/+9
|/
* Fix gitlab-shell access for any kind of branchv2.4.2Dmitriy Zaporozhets2015-01-281-1/+2
|
* Join changes in GitlabNet libraryDmitriy Zaporozhets2015-01-281-1/+1
|
* double quotes to single quotesChristian González2015-01-021-1/+1
|
* typo in message: "accesible" -> "accessible"Christian González2015-01-011-1/+1
|
* Add missing 'require_relative' in gitlab_net.rbJacob Vosmaer2014-11-251-0/+1
| | | | | | | | | | | | | | | | | Without this 'require' statement, you get the following error: ``` $ git ls-remote origin /home/git/gitlab-shell/lib/gitlab_net.rb:30:in `check_access': uninitialized constant GitlabNet::GitAccessStatus (NameError) from /home/git/gitlab-shell/lib/gitlab_shell.rb:63:in `validate_access' from /home/git/gitlab-shell/lib/gitlab_shell.rb:24:in `exec' from /home/git/gitlab-shell/bin/gitlab-shell:16:in `<main>' fatal: Could not read from remote repository. Please make sure you have the correct access rights and the repository exists. ```
* Revert "Revert "Merge branch 'git_hook_messages'""Valery Sizov2014-11-241-2/+6
| | | | This reverts commit f8453da5868dd7a23d0f2f3da7a45e33c441d1db.
* Revert "Merge branch 'git_hook_messages'"Jacob Vosmaer2014-11-201-6/+2
| | | | | | | | | | At least the following things were broken: - missing require for 'gitlab_access_status' in lib/gitlab_net.rb - gitlabhq master internal API returns 'true' or 'false', gitlab-shell expects JSON This reverts commit 11311a95545f967a5736cd16ab5fc37f7e658519, reversing changes made to 45444597aef3e434571de2491934ae92357ad231.
* Show error message when git access is rejectedValery Sizov2014-11-141-2/+6
|
* add secret tokenValery Sizov2014-10-151-1/+6
|
* GitLab /api/allowed endpoint requires POST requestDmitriy Zaporozhets2014-09-031-4/+26
| | | | | | | This commit made changes to GitLab shell to work with huge pushed (ex. 1k branhes) using POST request to API Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
* Update GitlabNet to match new logicDmitriy Zaporozhets2014-09-011-8/+4
| | | | Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
* Improve coverage.Gabor Nagy2014-06-231-16/+19
|
* Make force push detection actually workDmitriy Zaporozhets2014-04-031-0/+1
| | | | Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
* first setup to protect protected branched to force updatesSteven Thonus2014-03-251-1/+1
| | | | rebased for new code
* Fix testsDmitriy Zaporozhets2014-03-191-2/+3
| | | | Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
* Send api.allowed? request for both http and ssh pushDmitriy Zaporozhets2014-03-191-3/+15
| | | | Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
* Merge pull request #56 from smashwilson/36-loggerDmitriy Zaporozhets2013-06-101-2/+10
|\ | | | | Logger
| * Always log non-200 responses from the GitLab API.ash2013-05-181-1/+5
| |
| * Log all GETs and responses at :debug.ash2013-05-181-2/+6
| |
* | Add ca_file/ca_path configuration options.Akinori MUSHA2013-06-071-3/+21
|/
* https can be served also on non-standard portPiotr Roszatycki2013-04-031-1/+1
|
* Do not fall on discover deployment keys. Closes #25Akzhan2013-03-251-1/+1
|
* Require opensslMartin Bastien2013-03-231-0/+1
| | | | Fix the "uninitialized constant GitlabNet::OpenSSL (NameError)" after upgrading to ruby 2.0
* http_settings configuration option added.Akzhan2013-03-231-1/+14
| | | | | | | Now it supports: * self_signed_cert option to allow self-signed certificates over https protocol. * user and password options to pass though http auth.
* gitlab_net#host: slash is missingMaxim Filatov2013-03-211-1/+1
|
* remove putsDmitriy Zaporozhets2013-03-111-1/+0
|
* test GitlabNet allowed methodDmitriy Zaporozhets2013-03-111-0/+1
|
* Add ssh support for next syntax: git clone ssh://git@localhost/group/project.gitDmitriy Zaporozhets2013-02-191-1/+3
|
* oops. forgot about paramsDmitriy Zaporozhets2013-02-071-1/+1
|