From 609baf6f34fd3aee89aab3b2b8e038d331e632b6 Mon Sep 17 00:00:00 2001 From: Achilleas Pipinellis Date: Mon, 18 Jan 2016 09:27:35 +0100 Subject: Refactor deploy_key_multiple_projects API documentation [ci skip] --- doc/api/deploy_key_multiple_projects.md | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) (limited to 'doc') diff --git a/doc/api/deploy_key_multiple_projects.md b/doc/api/deploy_key_multiple_projects.md index 1a5a458905e..3ad836f51b5 100644 --- a/doc/api/deploy_key_multiple_projects.md +++ b/doc/api/deploy_key_multiple_projects.md @@ -1,25 +1,29 @@ # Adding deploy keys to multiple projects -If you want to easily add the same deploy key to multiple projects in the same group, this can be achieved quite easily with the API. +If you want to easily add the same deploy key to multiple projects in the same +group, this can be achieved quite easily with the API. -First, find the ID of the projects you're interested in, by either listing all projects: +First, find the ID of the projects you're interested in, by either listing all +projects: ``` -curl --header 'PRIVATE-TOKEN: abcdef' https://gitlab.com/api/v3/projects +curl -H 'PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK' https://gitlab.example.com/api/v3/projects ``` -Or finding the id of a group and then listing all projects in that group: +Or finding the ID of a group and then listing all projects in that group: ``` -curl --header 'PRIVATE-TOKEN: abcdef' https://gitlab.com/api/v3/groups +curl -H 'PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK' https://gitlab.example.com/api/v3/groups # For group 1234: -curl --header 'PRIVATE-TOKEN: abcdef' https://gitlab.com/api/v3/groups/1234 +curl -H 'PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK' https://gitlab.example.com/api/v3/groups/1234 ``` With those IDs, add the same deploy key to all: + ``` for project_id in 321 456 987; do - curl -X POST --data '{"title": "my key", "key": "ssh-rsa AAAA..."}' --header 'PRIVATE-TOKEN: abcdef' https://gitlab.com/api/v3/projects/${project_id}/keys + curl -X POST -H "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" -H "Content-Type: application/json" \ + --data '{"title": "my key", "key": "ssh-rsa AAAA..."}' https://gitlab.example.com/api/v3/projects/${project_id}/keys done ``` -- cgit v1.2.3 From bef01c48bd3702e996c55484ed777db095ce480a Mon Sep 17 00:00:00 2001 From: Achilleas Pipinellis Date: Mon, 18 Jan 2016 09:43:46 +0100 Subject: Refactor session API documentation [ci skip] --- doc/api/session.md | 42 +++++++++++++++++++++++++----------------- 1 file changed, 25 insertions(+), 17 deletions(-) (limited to 'doc') diff --git a/doc/api/session.md b/doc/api/session.md index 47c1c8a7a49..71e93d0bb0a 100644 --- a/doc/api/session.md +++ b/doc/api/session.md @@ -1,39 +1,47 @@ # Session -Login to get private token +You can login with both GitLab and LDAP credentials in order to obtain the +private token. ``` POST /session ``` -Parameters: +| Attribute | Type | Required | Description | +| ---------- | ------- | -------- | -------- | +| `login` | string | yes | The username of the user| +| `email` | string | yes if login is not provided | The email of the user | +| `password` | string | yes | The password of the user | -- `login` (required) - The login of user -- `email` (required if login missing) - The email of user -- `password` (required) - Valid password - -**You can login with both GitLab and LDAP credentials now** +```bash +curl -X POST "https://gitlab.example.com/api/v3/session?login=john_smith&password=strongpassw0rd" +``` +Example response: ```json { - "id": 1, - "username": "john_smith", - "email": "john@example.com", "name": "John Smith", - "private_token": "dd34asd13as", - "blocked": false, - "created_at": "2012-05-23T08:00:58Z", + "username": "john_smith", + "id": 32, + "state": "active", + "avatar_url": null, + "created_at": "2015-01-29T21:07:19.440Z", + "is_admin": true, "bio": null, "skype": "", "linkedin": "", "twitter": "", "website_url": "", - "dark_scheme": false, + "email": "john@example.com", "theme_id": 1, - "is_admin": false, + "color_scheme_id": 1, + "projects_limit": 10, + "current_sign_in_at": "2015-07-07T07:10:58.392Z", + "identities": [], "can_create_group": true, - "can_create_team": true, - "can_create_project": true + "can_create_project": true, + "two_factor_enabled": false, + "private_token": "9koXpg98eAheJpvBs5tK" } ``` -- cgit v1.2.3 From f835fa8d750b3b8b13b3b6e24780c1e4e01b9796 Mon Sep 17 00:00:00 2001 From: Eric L Frederich Date: Thu, 4 Feb 2016 10:42:36 -0500 Subject: fix documentation bug / typo --- doc/customization/issue_closing.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'doc') diff --git a/doc/customization/issue_closing.md b/doc/customization/issue_closing.md index 00edfc97ed9..194b8e00299 100644 --- a/doc/customization/issue_closing.md +++ b/doc/customization/issue_closing.md @@ -16,7 +16,7 @@ Here, `%{issue_ref}` is a complex regular expression defined inside GitLab, that For example: ``` -git commit -m "Awesome commit message (Fix #20, Fixes #21 and Closes group/otherproject#2). This commit is also related to #17 and fixes #18, #19 and https://gitlab.example.com/group/otherproject/issues/23." +git commit -m "Awesome commit message (Fix #20, Fixes #21 and Closes group/otherproject#22). This commit is also related to #17 and fixes #18, #19 and https://gitlab.example.com/group/otherproject/issues/23." ``` will close `#18`, `#19`, `#20`, and `#21` in the project this commit is pushed to, as well as `#22` and `#23` in group/otherproject. `#17` won't be closed as it does not match the pattern. It also works with multiline commit messages. -- cgit v1.2.3 From bf94ddef78c2326bdae28317bb22d1f7c55a2acf Mon Sep 17 00:00:00 2001 From: Achilleas Pipinellis Date: Fri, 5 Feb 2016 16:53:00 +0200 Subject: Fix wrong Ruby SHA and replace with sha256sum [ci skip] --- doc/install/installation.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'doc') diff --git a/doc/install/installation.md b/doc/install/installation.md index a2c23bd52e5..db791ea6182 100644 --- a/doc/install/installation.md +++ b/doc/install/installation.md @@ -124,7 +124,7 @@ Download Ruby and compile it: mkdir /tmp/ruby && cd /tmp/ruby curl -O --progress https://cache.ruby-lang.org/pub/ruby/2.2/ruby-2.2.4.tar.gz - echo 'e2e195a4a58133e3ad33b955c829bb536fa3c075 ruby-2.2.4.tar.gz' | shasum -c - && tar xzf ruby-2.2.4.tar.gz + echo 'b6eff568b48e0fda76e5a36333175df049b204e91217aa32a65153cc0cdcb761 ruby-2.2.4.tar.gz' | sha256sum -c - && tar xzf ruby-2.2.4.tar.gz cd ruby-2.2.4 ./configure --disable-install-rdoc make -- cgit v1.2.3 From a95c6e38c6311b8b096a35e6ed81c5a4b11b6c9f Mon Sep 17 00:00:00 2001 From: Achilleas Pipinellis Date: Fri, 5 Feb 2016 17:06:25 +0200 Subject: Add ruby version update info in doc_styleguide [ci skip] --- doc/development/doc_styleguide.md | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'doc') diff --git a/doc/development/doc_styleguide.md b/doc/development/doc_styleguide.md index caaa4032db2..96d1dffbc52 100644 --- a/doc/development/doc_styleguide.md +++ b/doc/development/doc_styleguide.md @@ -120,6 +120,17 @@ Inside the document: `http://doc.gitlab.com/ce/administration/restart_gitlab.html`. Replace `reconfigure` with `restart` where appropriate. +## Installation guide + +- **Ruby:** + In [step 2 of the installation guide](../install/installation.md#2-ruby), + we install Ruby from source. Whenever there is a new version that needs to + be updated, remember to change it throughout the codeblock and also replace + the sha256sum (it can be found in the [downloads page][ruby-dl] of the Ruby + website). + +[ruby-dl]: https://www.ruby-lang.org/en/downloads/ "Ruby download website" + ## API Here is a list of must-have items. Use them in the exact order that appears -- cgit v1.2.3 From aa5eca47db61a365736517ff1a7cc5a42c2f9ed9 Mon Sep 17 00:00:00 2001 From: Achilleas Pipinellis Date: Fri, 5 Feb 2016 18:05:25 +0200 Subject: Make sure the public/uploads/ directory is created [ci skip] --- doc/install/installation.md | 3 +++ 1 file changed, 3 insertions(+) (limited to 'doc') diff --git a/doc/install/installation.md b/doc/install/installation.md index db791ea6182..3eb9b1767c5 100644 --- a/doc/install/installation.md +++ b/doc/install/installation.md @@ -267,6 +267,9 @@ sudo usermod -aG redis git sudo chmod -R u+rwX tmp/pids/ sudo chmod -R u+rwX tmp/sockets/ + # Create the public/uploads/ directory + sudo -u git -H mkdir public/uploads/ + # Make sure GitLab can write to the public/uploads/ directory sudo chmod -R u+rwX public/uploads -- cgit v1.2.3