Search
 
SCRIPT & CODE EXAMPLE
 

SHELL

gitlab ci credentials store

before_script:
  ##
  ## Install ssh-agent if not already installed, it is required by Docker.
  ## (change apt-get to yum if you use an RPM-based image)
  ##
  - 'command -v ssh-agent >/dev/null || ( apt-get update -y && apt-get install openssh-client -y )'

  ##
  ## Run ssh-agent (inside the build environment)
  ##
  - eval $(ssh-agent -s)

  ##
  ## Add the SSH key stored in SSH_PRIVATE_KEY variable to the agent store
  ## We're using tr to fix line endings which makes ed25519 keys work
  ## without extra base64 encoding.
  ## https://gitlab.com/gitlab-examples/ssh-private-key/issues/1#note_48526556
  ##
  - echo "$SSH_PRIVATE_KEY" | tr -d '
' | ssh-add -

  ##
  ## Create the SSH directory and give it the right permissions
  ##
  - mkdir -p ~/.ssh
  - chmod 700 ~/.ssh

  ##
  ## Optionally, if you will be using any Git commands, set the user name and
  ## and email.
  ##
  # - git config --global user.email "user@example.com"
  # - git config --global user.name "User name"
Comment

PREVIOUS NEXT
Code Example
Shell :: Comparing 2 Hashes in bash 
Shell :: find and rm files 
Shell :: Copying Folder to Server 
Shell :: scoop update 
Shell :: ssh open gui app on host 
Shell :: use lines from file for bash command 
Shell :: add user to sudoer "zsh" customization 
Shell :: how to install ferment 
Shell :: ring Change the current directory 
Shell :: git2 
Shell :: block bench download linux command 
Shell :: start adb exe manually if necessary 
Shell :: how to uninstall nginx in ubuntu 20.04 
Shell :: DISABLE_DATABASE_ENVIRONMENT_CHECK=1 
Shell :: sh add 
Shell :: install jupyter notebook pypi 
Shell :: linux disk usage in human readable format 
Shell :: how to close git issue with fixes automaticallt 
Shell :: vscode kite extention uninstall 
Shell :: Additional UART in u-boot 
Shell :: kali linuz 
Shell :: Git - Take a peek at a file of another branch 
Shell :: How install CoolTerm on Linux? 
Shell :: restart iis 
Shell :: using both ca cert and certificate between server and client 
Shell :: brew mac install cargo with toolchain 
Shell :: command prompt change directory to network drive 
Shell :: bash similiar to choice in cmd 
Shell :: Calling Non-checksummed download of pup formula file from an arbitrary URL is disabled! 
Shell :: run script on files in folder output to file 
ADD CONTENT
Topic
Content
Source link
Name
6+6 =