Global Search file content in Gitlab repositories, search across repositories, search across all files
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:
-
Install the tool by npm in Terminal
-
npm install -g gitlab-search
-
-
Create a GitLab personal access token
- https://gitlab.com/-/profile/personal_access_tokens
- 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.
- or Select ALL; We can see all the existing token under: Active personal access tokens (*)
- Got token(Your new personal access token) like: _avcPZb6sd4sUWXe3***
-
Setup gitlab-search
-
gitlab-search setup _avcPZb6sd4sUWXe3***
- Successfully wrote config to .gitlabsearchrc, gitlab-search is now ready to be used
-
-
Usage sample:
- Search File content:
-
gitlab-search functionabc
This's a useful tool to globally search file content in gitlab repositories, enjoy it.
本文来自博客园,作者:CarlZeng,转载请注明原文链接:https://www.cnblogs.com/backuper/p/Global_Search_in_Gitlab_repositories.html
需求沟通链接 扫客服加群: