gitlab

SSH config with multiple keys for multiple gitlab user accounts

浪子不回头ぞ 提交于 2020-06-27 21:02:45
问题 I run Gitlab CE on my server and use several different user accounts to group my repos by interest. The problem is with SSH. I found the following solution for github: https://gist.github.com/jexchan/2351996 In this guide one just uses different hosts with the same hostname in the config. Which is little effort to achieve what I'd like to achieve. But this solution does not work with Gitlab or at least not for me. This solution is all over the web. One that is less used but is working for me,

SSH config with multiple keys for multiple gitlab user accounts

时光毁灭记忆、已成空白 提交于 2020-06-27 21:00:29
问题 I run Gitlab CE on my server and use several different user accounts to group my repos by interest. The problem is with SSH. I found the following solution for github: https://gist.github.com/jexchan/2351996 In this guide one just uses different hosts with the same hostname in the config. Which is little effort to achieve what I'd like to achieve. But this solution does not work with Gitlab or at least not for me. This solution is all over the web. One that is less used but is working for me,

how to mask AWS_SECRET_ACCESS_KEY in gitlab-ci

若如初见. 提交于 2020-06-27 02:54:28
问题 In my Gitlab CI, I need to push a docker image to AWS ECR, so I need AWS_ACCESS_KEY_ID and AWS_SECRET_ACCESS_KEY . In Gitlab, when I go in Settings > CI / CD > Variables, I can put my variables, but I won't be able to mask AWS_SECRET_ACCESS_KEY as stated in the docs: The value must be in a single line. The value must not have escape characters. The value must not use variables. The value must not have any whitespace. The value must be at least 8 characters long. The SECRET has a format like

how to mask AWS_SECRET_ACCESS_KEY in gitlab-ci

筅森魡賤 提交于 2020-06-27 02:53:59
问题 In my Gitlab CI, I need to push a docker image to AWS ECR, so I need AWS_ACCESS_KEY_ID and AWS_SECRET_ACCESS_KEY . In Gitlab, when I go in Settings > CI / CD > Variables, I can put my variables, but I won't be able to mask AWS_SECRET_ACCESS_KEY as stated in the docs: The value must be in a single line. The value must not have escape characters. The value must not use variables. The value must not have any whitespace. The value must be at least 8 characters long. The SECRET has a format like

how to mask AWS_SECRET_ACCESS_KEY in gitlab-ci

谁都会走 提交于 2020-06-27 02:52:39
问题 In my Gitlab CI, I need to push a docker image to AWS ECR, so I need AWS_ACCESS_KEY_ID and AWS_SECRET_ACCESS_KEY . In Gitlab, when I go in Settings > CI / CD > Variables, I can put my variables, but I won't be able to mask AWS_SECRET_ACCESS_KEY as stated in the docs: The value must be in a single line. The value must not have escape characters. The value must not use variables. The value must not have any whitespace. The value must be at least 8 characters long. The SECRET has a format like

Move git repo with git clone --mirror and git push --mirror

你离开我真会死。 提交于 2020-06-26 08:49:09
问题 I have to move a couple of repos from Gitlab to Bitbucket and discovered that the easiest way to do it seems to be: Create new empty repository in Bitbucket git clone --mirror git@gitlab.com:path/to/repo.git cd repo.git git remote set-url origin git@bitbucket.org:path/to/repo.git git push --mirror This seems to copy the entire repo including tags, all branches etc. and I haven't discovered any disadvantages of this method yet. However, as I haven't seen this method anywhere on the internet, I

HOW to check id of project in gitlab

心已入冬 提交于 2020-06-26 06:23:56
问题 I want to use GitLab API to get the contents of my project. The URL is like this: https://gitlab.com/api/v4/projects/:id/repository/files/:file_path?private-token=xxxxx I have already created the private token, but I can not find my project's ID. Looking for reply! 回答1: You can use the following to get the project's ID, inserting the project path which should be URL encoded. Example: https://gitlab.com/api/v4/projects/[project path URL encoded] 回答2: Since GitLab 11.2 (August 22nd, 2018), it

How to Merge two different Git repositories?

喜夏-厌秋 提交于 2020-06-26 06:13:11
问题 I have two Github repositories. One repository is on the remote server and another on the local server. Both of them have different commit histories of different files and folders. Now I wanted to merge both of them so that I can have both of them on the remote server as one single repository. Please help! I have looked for various solutions suggesting as: reset the head of the local repository and then pull the remote repository on the same directory but it doesn't seem to be working: git

Git clone through Nginx proxy for Gitlab server is not working

六眼飞鱼酱① 提交于 2020-06-25 06:37:51
问题 My Nginx Server is acting as a proxy for a Gitlab Server, the problem is when I try " **git clone git@gitlab.example.com:username/project.git** " I'm unable to clone the project [it is not tunneling from Nginx server to Gitlab server] When I update my local system's /etc/hosts file with IP Address of Gitlab Server then it clones fine without password [I've updated my profile with SSH Public Key on Gitlab]. So I came to the conclusion that I've to update my Nginx Configuration with rules that

How do I push to a repo from within a gitlab CI pipeline?

时光怂恿深爱的人放手 提交于 2020-06-24 21:29:47
问题 In my CI pipeline I am generating an artifact public/graph.png that visualises some aspect of my code. In a later step I want to commit that to the repo from within the CI pipeline. Here's the pertinent part of .gitlab-ci.yml : commit-graph: stage: pages script: - git config user.email "cipipeline@example.com" - git config user.name "CI Pipeline" - cd /group/project - mv public/graph.png . - git add graph.png - git commit -m "committing graph.png [ci skip]" - echo $CI_COMMIT_REF_NAME - git