docs icon indicating copy to clipboard operation
docs copied to clipboard

Add CLI doc updates for GitLab

Open amyblais opened this issue 2 years ago • 4 comments

These 2 docs need updates:

  1. https://docs.mattermost.com/manage/command-line-tools.html#use-the-cli-on-gitlab-omnibus
  2. https://docs.gitlab.com/ee/integration/mattermost/#mattermost-command-line-tools-cli (I'm not sure who normally owns updating this ... so let me know any concerns!)

More context here: https://gitlab.com/gitlab-org/omnibus-gitlab/-/issues/6490#note_745347313.

Let me know any questions!

amyblais avatar Nov 30 '21 17:11 amyblais

@justinegeffen @cwarnermm how can I help move this forward. The deadline for GitLab 14.6 (where MM 6.1 is going to be included) is drawing close.

nab-77 avatar Dec 09 '21 11:12 nab-77

Thanks, @nab-77! A deadline for this one wasn't clear, so I appreciate knowing the urgency on this one. I'll review today and follow up with you about any gaps or information I need assistance with to complete these doc updates by end of day.

cwarnermm avatar Dec 09 '21 13:12 cwarnermm

Please let me know how I can help.

nab-77 avatar Dec 09 '21 13:12 nab-77

Using the GitLab OAuth2 integration with Mattermost: No formal documentation specifies how to use mmctl auth login --strict URL --name HOST --access-token STRING properly. Which token? From where? I found a help written for developers using the API with some guidance on how to acquire a Mattermost token. Sadly, Mattermost session tokens are not able to be created from within Mattermost because the GitLab integration appears to disable the "Manage Tokens" features completely--- even for System Admins.

Attempting to use an Auth Token from within GitLab fails as does using a web-browser session token. So also does any mmctl --username USERNAME --password

UPDATE:

The solution is to EXTRACT the access-token STRING from the MMAUTHTOKEN COOKIE in a Web Browser that you have already authenticated against MM in. Otherwise, there is no user-friendly way to get the token. Here are some steps:

  1. Log into your mattermost instance in your web browser
  2. Open the Developer Panel for your web browser
  3. Likely search in the Application tab or somesuch and find the Storage > Cookies
  4. Find the MMAUTHTOKEN cookie, and copy the Value.
  5. Paste the value into your command line: mmctl auth login --strict URL --name HOST --access-token MMAUTHTOKEN

Have a nice day!

decrementor avatar Jan 15 '22 01:01 decrementor