After CentOS 7 end of life maybe you get error when update repo.
Last version Centos 7.9.2009 (Same as my case)
Create file
nano /etc/yum.repos.d/CentOS-Vault.repo
Fill the file
# C7.9.2009
[C7.9.2009-base]
name=CentOS-7.9.2009 - Base
baseurl=http://vault.centos.org/7.9.2009/os/$basearch/
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7
enabled=1
[C7.9.2009-updates]
name=CentOS-7.9.2009 - Updates
baseurl=http://vault.centos.org/7.9.2009/updates/$basearch/
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7
enabled=1
[C7.9.2009-extras]
name=CentOS-7.9.2009 - Extras
baseurl=http://vault.centos.org/7.9.2009/extras/$basearch/
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7
enabled=1
[C7.9.2009-centosplus]
name=CentOS-7.9.2009 - CentOSPlus
baseurl=http://vault.centos.org/7.9.2009/centosplus/$basearch/
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7
enabled=1
[C7.9.2009-fasttrack]
name=CentOS-7.9.2009 - CentOSPlus
baseurl=http://vault.centos.org/7.9.2009/fasttrack/$basearch/
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7
enabled=1
then create file
nano /etc/yum.repos.d/endpoint.repo
fill the file with this :
[endpoint]
name=End Point repository
baseurl=https://packages.endpointdev.com/rhel/$releasever/os/$basearch/
enabled=1
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-endpoint-7
protect=0
then update with :
yum update
install git :
yum install git
Installing:
git x86_64 2.43.0-1.ep7 endpoint
Installing for dependencies:
git-core x86_64 2.43.0-1.ep7 endpoint
git-core-doc noarch 2.43.0-1.ep7 endpoint
pcre2 x86_64 10.23-2.el7 C7.9.2009-base
perl-Error noarch 1:0.17020-2.el7 C7.9.2009-base
perl-Git noarch 2.43.0-1.ep7 endpoint
perl-TermReadKey x86_64 2.30-20.el7 C7.9.2009-base