Global Search file content in Gitlab repositories, search across repositories, search across all files-CarlZeng

How Global Search file content in Gitlab repositories(search across repositories)?

There is an existing answer to it, we can file the source code here  https://github.com/phillipj/gitlab-search

Yes, that’s a Gitlab solution sit in Github 🙂    maybe you can find Github solutions/features in Gitlab repository too

Steps for Mac:

  1. Install the tool by npm in Terminal

    1. npm install -g gitlab-search

      After installation success, it make sense to prepare a GitLab access token now
      2. #### Create a GitLab personal access token

    2. https://gitlab.com/-/profile/personal_access_tokens

    3. Note: Make sure check-on ‘read_api’

      Grants read access to the API, including all groups and projects, the container registry, and the package registry.

    4. or Select ALL;  We can see all the existing token under: Active personal access tokens (*)

    5. Got token(Your new personal access token) like: _avcPZb6sd4sUWXe3***
    6. Setup gitlab-search

    7. gitlab-search setup _avcPZb6sd4sUWXe3***

    8. Successfully wrote config to .gitlabsearchrc, gitlab-search is now ready to be used

    9. Usage sample:

    10. Search File content:

    11. gitlab-search functionabc

This’s a useful tool to globally search file content in gitlab repositories, enjoy it.


评论

发表回复

您的邮箱地址不会被公开。 必填项已用 * 标注