prepare a actions runner for Code Scanning

这篇博客介绍了如何在AWS EC2实例中更新Git到2.30版本,移除旧版本并安装Git LFS。接着,检查并安装Docker,确保用户可以无须sudo权限运行Docker。最后,提供了在Ubuntu 18.04上安装Git 2.30的步骤,包括添加官方PPA,更新仓库和安装。整个过程旨在提升开发环境的效率。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

1. create a new aws ec2 instance

2. check the git, usually the default of git install in the instance should be 1.18.XX, we need to update it to git 2.XXX

   $ git --version

  $ sudo yum remove git*

  $ sudo yum -y install https://packages.endpoint.com/rhel/7/os/x86_64/endpoint-repo-1.7-1.x86_64.rpm

  $ sudo yum install git

$ git --version

git version 2.30.1

3. check if the docker is installed in the instance, we need to intall it if not.

$docker --verison

$sudo yum intall docker

$sudo service docker restart

add current user to docker group, give the user access to docker, so that we don't need to add "sudo" when using docker.

$sudo groupadd docker

$sudo usermod -aG docker centos

$sudo reboot  #restart the instance.

4.setup runner in ths instance

 

install git 2.30 for ubuntu 18.04:

remove the old version

$sudo apt-get remove git

Step 1: Add the Official PPA by GIT

sudo add-apt-repository ppa:git-core/ppa

Step 2: Update the repository

sudo apt update

Step 3: Install Git 2.30.0

sudo apt install git

install git-lfs:

  • curl -s https://packagecloud.io/install/repositories/github/git-lfs/script.deb.sh | sudo bash
  • sudo apt-get install git-lfs
  • git lfs install

 

  

 

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值