jihu gitlab support team
      • Sharing URL Link copied
      • /edit
      • View mode
        • Edit mode
        • View mode
        • Book mode
        • Slide mode
        Edit mode View mode Book mode Slide mode
      • Customize slides
      • Note Permission
      • Read
        • Owners
        • Signed-in users
        • Everyone
        Owners Signed-in users Everyone
      • Write
        • Owners
        • Signed-in users
        • Everyone
        Owners Signed-in users Everyone
      • Engagement control Commenting, Suggest edit, Emoji Reply
    • Invite by email
      Invitee

      This note has no invitees

    • Publish Note

      Share your work with the world Congratulations! 🎉 Your note is out in the world Publish Note

      Your note will be visible on your profile and discoverable by anyone.
      Your note is now live.
      This note is visible on your profile and discoverable online.
      Everyone on the web can find and read all notes of this public team.
      See published notes
      Unpublish note
      Please check the box to agree to the Community Guidelines.
      View profile
    • Commenting
      Permission
      Disabled Forbidden Owners Signed-in users Everyone
    • Enable
    • Permission
      • Forbidden
      • Owners
      • Signed-in users
      • Everyone
    • Suggest edit
      Permission
      Disabled Forbidden Owners Signed-in users Everyone
    • Enable
    • Permission
      • Forbidden
      • Owners
      • Signed-in users
    • Emoji Reply
    • Enable
    • Versions and GitHub Sync
    • Note settings
    • Note Insights New
    • Engagement control
    • Make a copy
    • Transfer ownership
    • Delete this note
    • Insert from template
    • Import from
      • Dropbox
      • Google Drive
      • Gist
      • Clipboard
    • Export to
      • Dropbox
      • Google Drive
      • Gist
    • Download
      • Markdown
      • HTML
      • Raw HTML
Menu Note settings Note Insights Versions and GitHub Sync Sharing URL Help
Menu
Options
Engagement control Make a copy Transfer ownership Delete this note
Import from
Dropbox Google Drive Gist Clipboard
Export to
Dropbox Google Drive Gist
Download
Markdown HTML Raw HTML
Back
Sharing URL Link copied
/edit
View mode
  • Edit mode
  • View mode
  • Book mode
  • Slide mode
Edit mode View mode Book mode Slide mode
Customize slides
Note Permission
Read
Owners
  • Owners
  • Signed-in users
  • Everyone
Owners Signed-in users Everyone
Write
Owners
  • Owners
  • Signed-in users
  • Everyone
Owners Signed-in users Everyone
Engagement control Commenting, Suggest edit, Emoji Reply
  • Invite by email
    Invitee

    This note has no invitees

  • Publish Note

    Share your work with the world Congratulations! 🎉 Your note is out in the world Publish Note

    Your note will be visible on your profile and discoverable by anyone.
    Your note is now live.
    This note is visible on your profile and discoverable online.
    Everyone on the web can find and read all notes of this public team.
    See published notes
    Unpublish note
    Please check the box to agree to the Community Guidelines.
    View profile
    Engagement control
    Commenting
    Permission
    Disabled Forbidden Owners Signed-in users Everyone
    Enable
    Permission
    • Forbidden
    • Owners
    • Signed-in users
    • Everyone
    Suggest edit
    Permission
    Disabled Forbidden Owners Signed-in users Everyone
    Enable
    Permission
    • Forbidden
    • Owners
    • Signed-in users
    Emoji Reply
    Enable
    Import from Dropbox Google Drive Gist Clipboard
       Owned this note    Owned this note      
    Published Linked with GitHub
    1
    • Any changes
      Be notified of any changes
    • Mention me
      Be notified of mention me
    • Unsubscribe
    # GitLab集成Jira 环境说明: - GitLab地址 - https://gitlab.cdneks.com - Jira地址 - https://jira.cdneks.com ## 1. Jira安装 官方文档: - [Install a Jira trial](https://confluence.atlassian.com/adminjiraserver/install-a-jira-trial-1044784650.html) - [Integrating Jira with Apache using SSL](https://confluence.atlassian.com/adminjiraserver/integrating-jira-with-apache-using-ssl-938847754.html) ### 1.1 下载Jira [Download Jira Software Server](https://www.atlassian.com/software/jira/download) 选择`Jira Software`,`latest release`, `linux 64bit` ```bash atlassian-jira-software-8.16.1-x64.bin ``` ### 1.2 安装Jira ```bash chmod a+x atlassian-jira-software-X.X.X-x64.bin sudo ./atlassian-jira-software-X.X.X-x64.bin ``` - 选择`Express Install` (option 1) - 安装完成后,Jira web服务监听在8080端口 ### 1.3 设置Jira 浏览器打开jira,根据向导设置Jira - 选择`single node` - 创建账号 - `generate a license`,这一步需要连外网、申请Jira试用密钥 ### 1.4 Jira启用https 1. 安装apache ```bash yum install httpd mod_ssl ``` 2. 准备https证书 可以购买收费的https证书,这里用lets encrypt申请免费的证书: - [安装certbot](https://certbot.eff.org/lets-encrypt/centosrhel7-apache.html) - 申请https证书 ```bash certbot certonly --standalone -d $domain ``` - 将`/etc/letsencrypt/live/$domain`下的`cert.pem`,`privkey.pem`, `chain.pem`拷贝到`/etc/httpd/ssl/`目录下 3. 设置apache反向代理 修改`/etc/httpd/conf.d/ssl.conf` ```bash <VirtualHost *:443> ServerName jira.cdneks.com SSLEngine on SSLProtocol all -SSLv2 -SSLv3 SSLCertificateFile /etc/httpd/ssl/cert.pem SSLCertificateKeyFile /etc/httpd/ssl/privkey.pem SSLCertificateChainFile /etc/httpd/ssl/chain.pem <Files ~ "\.(cgi|shtml|phtml|php3?)$"> SSLOptions +StdEnvVars </Files> <Directory "/var/www/cgi-bin"> SSLOptions +StdEnvVars </Directory> BrowserMatch "MSIE [2-5]" \ nokeepalive ssl-unclean-shutdown \ downgrade-1.0 force-response-1.0 CustomLog logs/ssl_request_log \ "%t %h %{SSL_PROTOCOL}x %{SSL_CIPHER}x \"%r\" %b" # Jira Proxy Configuration: <Proxy *> Order deny,allow Allow from all </Proxy> SSLProxyEngine On ProxyRequests Off ProxyPreserveHost On ProxyPass / http://127.0.0.1:8080/ ProxyPassReverse / http://127.0.0.1:8080/ </VirtualHost> ``` 重启apache: ```bash systemctl restart httpd ``` 4. Jira使用反向代理 - 备份`/opt/atlassian/jira/conf/server.xml`,然后修改该文件 - 将文件中的这段配置复制一段放到上方,然后把这段配置的端口从8080改到8081 - 在上面那段配置下增加https代理配置,注意`proxyName`改成自己的域名 两端配置如下: ```bash <Connector port="8080" relaxedPathChars="[]|" relaxedQueryChars="[]|{}^&#x5c;&#x60;&quot;&lt;&gt;" maxThreads="150" minSpareThreads="25" connectionTimeout="20000" enableLookups="false" maxHttpHeaderSize="8192" protocol="HTTP/1.1" useBodyEncodingForURI="true" acceptCount="100" disableUploadTimeout="true" bindOnInit="false" scheme="https" proxyName="jira.cdneks.com" proxyPort="443"/> <!-- Relaxing chars because of JRASERVER-67974 --> <Connector port="8081" relaxedPathChars="[]|" relaxedQueryChars="[]|{}^&#x5c;&#x60;&quot;&lt;&gt;" maxThreads="150" minSpareThreads="25" connectionTimeout="20000" enableLookups="false" maxHttpHeaderSize="8192" protocol="HTTP/1.1" useBodyEncodingForURI="true" acceptCount="100" disableUploadTimeout="true" bindOnInit="false"/> ``` - 重启jira ```bash /opt/atlassian/jira/bin/stop-jira.sh /opt/atlassian/jira/bin/start-jira.sh ``` ## 2. GitLab集成Jira 官方文档和视频: - [Linking GitLab accounts](https://confluence.atlassian.com/adminjiraserver/linking-gitlab-accounts-1027142272.html) - [GitLab with Jira](https://about.gitlab.com/solutions/jira/) ### 2.1 GitLab创建用户、`group`和`project` - 创建用户,email等信息与Jira中的用户对应 - 创建一个`test-group` - 在上面的组中创建一个`test-project` ### 2.2 Jira启用OAuth2 - 管理 > 系统 > OAuth 2.0. - 新增一个集成 - `服务提供商`选择`自定义` - 填入集成名称 - `客户ID`和`客户机密`暂时留空,将在下一步设置 - 填写`授权端点`和`令牌端点`,分别是: ```bash https://gitlab.cdneks.com/oauth/authorize https://gitlab.cdneks.com/oauth/token ``` - 点击`Generate`生成`重定向URL`,复制以便于下一步操作 ### 2.3 GitLab创建Jira Applications - 用户设置 > Applications,增加新的Application - Redirect URI: 填入从Jira拷贝的`重定向URL` - Confidential: 选中 - Scopes: 选择`api` - 提交 - 提交后就能得到Application ID和Secret ### 2.4 完成Jira OAuth2设置 - 填入GitLab Application ID、Secret - 范围选择`api` - 保存并测试连接 ### 2.5 Jira链接GitLab账号 - Jira管理 > 应用程序 > DVCS Accounts. - 点击`链接账户` - `Host`选择`GitLab Self-Managed` - `Host URL`填写`https://gitlab.cdneks.com` - `Team or User Account`填写GitLab的组名,例如:`test-group` - 点击`增加` - 按照向导执行剩下的操作,之后就可以把GitLab的`test-group`和`test-project`与Jira关联起来 ## 3. GitLab集成Jira的用法 ### 3.1 Jira Issue跟踪、智能提交、开发面板集成 官方文档: - [Using Smart Commits](https://confluence.atlassian.com/fisheye/using-smart-commits-960155400.html) 在GitLab 提交信息、合并请求信息中提及Jira Issue ID,可以: - 在Jira Issue面板中展示关联的GitLab提交、合并请求信息 - 在GitLab提交、合并请求信息中直接打开关联的Jira Issue - 评论Jira Issue - 设置Jira Issue状态 - 设置Jira Issue处理时间 ### 3.2 GitLab导入Jira Issue - GitLab Project Settings -> Integrations -> Jira - 填入Jira URL、Username、Password - 选中Active - 保存 - 新建一个空的GitLab Project,进入Issues -> Import Issue -> From Jira - 选择Jira Project - continue

    Import from clipboard

    Paste your markdown or webpage here...

    Advanced permission required

    Your current role can only read. Ask the system administrator to acquire write and comment permission.

    This team is disabled

    Sorry, this team is disabled. You can't edit this note.

    This note is locked

    Sorry, only owner can edit this note.

    Reach the limit

    Sorry, you've reached the max length this note can be.
    Please reduce the content or divide it to more notes, thank you!

    Import from Gist

    Import from Snippet

    or

    Export to Snippet

    Are you sure?

    Do you really want to delete this note?
    All users will lose their connection.

    Create a note from template

    Create a note from template

    Oops...
    This template has been removed or transferred.
    Upgrade
    All
    • All
    • Team
    No template.

    Create a template

    Upgrade

    Delete template

    Do you really want to delete this template?
    Turn this template into a regular note and keep its content, versions, and comments.

    This page need refresh

    You have an incompatible client version.
    Refresh to update.
    New version available!
    See releases notes here
    Refresh to enjoy new features.
    Your user state has changed.
    Refresh to load new user state.

    Sign in

    Forgot password

    or

    By clicking below, you agree to our terms of service.

    Sign in via Facebook Sign in via Twitter Sign in via GitHub Sign in via Dropbox Sign in with Wallet
    Wallet ( )
    Connect another wallet

    New to HackMD? Sign up

    Help

    • English
    • 中文
    • Français
    • Deutsch
    • 日本語
    • Español
    • Català
    • Ελληνικά
    • Português
    • italiano
    • Türkçe
    • Русский
    • Nederlands
    • hrvatski jezik
    • język polski
    • Українська
    • हिन्दी
    • svenska
    • Esperanto
    • dansk

    Documents

    Help & Tutorial

    How to use Book mode

    Slide Example

    API Docs

    Edit in VSCode

    Install browser extension

    Contacts

    Feedback

    Discord

    Send us email

    Resources

    Releases

    Pricing

    Blog

    Policy

    Terms

    Privacy

    Cheatsheet

    Syntax Example Reference
    # Header Header 基本排版
    - Unordered List
    • Unordered List
    1. Ordered List
    1. Ordered List
    - [ ] Todo List
    • Todo List
    > Blockquote
    Blockquote
    **Bold font** Bold font
    *Italics font* Italics font
    ~~Strikethrough~~ Strikethrough
    19^th^ 19th
    H~2~O H2O
    ++Inserted text++ Inserted text
    ==Marked text== Marked text
    [link text](https:// "title") Link
    ![image alt](https:// "title") Image
    `Code` Code 在筆記中貼入程式碼
    ```javascript
    var i = 0;
    ```
    var i = 0;
    :smile: :smile: Emoji list
    {%youtube youtube_id %} Externals
    $L^aT_eX$ LaTeX
    :::info
    This is a alert area.
    :::

    This is a alert area.

    Versions and GitHub Sync
    Get Full History Access

    • Edit version name
    • Delete

    revision author avatar     named on  

    More Less

    Note content is identical to the latest version.
    Compare
      Choose a version
      No search result
      Version not found
    Sign in to link this note to GitHub
    Learn more
    This note is not linked with GitHub
     

    Feedback

    Submission failed, please try again

    Thanks for your support.

    On a scale of 0-10, how likely is it that you would recommend HackMD to your friends, family or business associates?

    Please give us some advice and help us improve HackMD.

     

    Thanks for your feedback

    Remove version name

    Do you want to remove this version name and description?

    Transfer ownership

    Transfer to
      Warning: is a public team. If you transfer note to this team, everyone on the web can find and read this note.

        Link with GitHub

        Please authorize HackMD on GitHub
        • Please sign in to GitHub and install the HackMD app on your GitHub repo.
        • HackMD links with GitHub through a GitHub App. You can choose which repo to install our App.
        Learn more  Sign in to GitHub

        Push the note to GitHub Push to GitHub Pull a file from GitHub

          Authorize again
         

        Choose which file to push to

        Select repo
        Refresh Authorize more repos
        Select branch
        Select file
        Select branch
        Choose version(s) to push
        • Save a new version and push
        • Choose from existing versions
        Include title and tags
        Available push count

        Pull from GitHub

         
        File from GitHub
        File from HackMD

        GitHub Link Settings

        File linked

        Linked by
        File path
        Last synced branch
        Available push count

        Danger Zone

        Unlink
        You will no longer receive notification when GitHub file changes after unlink.

        Syncing

        Push failed

        Push successfully