git版本略低,引發的血案
原本部署在阿里雲上的項目,准備放到內網jenkins上發布,配置完成后發版,jenkins變紅了,詳細錯誤信息如下
ERROR: Error cloning remote repo 'origin'
hudson.plugins.git.GitException: Command "git fetch --tags --progress https://gitlab.kingtool.top/admin-public/cshopfront.git +refs/heads/*:refs/remotes/origin/*" returned status code 128:
stdout:
stderr: error: The requested URL returned error: 401 Unauthorized while accessing https://gitlab.kingtool.top/admin-public/cshopfront.git/info/refs
fatal: HTTP request failed
at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandIn(CliGitAPIImpl.java:2172)
at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandWithCredentials(CliGitAPIImpl.java:1864)
at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.access$500(CliGitAPIImpl.java:78)
at org.jenkinsci.plugins.gitclient.CliGitAPIImpl$1.execute(CliGitAPIImpl.java:545)
at org.jenkinsci.plugins.gitclient.CliGitAPIImpl$2.execute(CliGitAPIImpl.java:758)
at hudson.plugins.git.GitSCM.retrieveChanges(GitSCM.java:1152)
at hudson.plugins.git.GitSCM.checkout(GitSCM.java:1192)
at org.jenkinsci.plugins.workflow.steps.scm.SCMStep.checkout(SCMStep.java:124)
at org.jenkinsci.plugins.workflow.steps.scm.SCMStep$StepExecutionImpl.run(SCMStep.java:93)
at org.jenkinsci.plugins.workflow.steps.scm.SCMStep$StepExecutionImpl.run(SCMStep.java:80)
at org.jenkinsci.plugins.workflow.steps.SynchronousNonBlockingStepExecution.lambda$start$0(SynchronousNonBlockingStepExecution.java:47)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)
經查git版本為1.7過低了
所以卸載git,重裝,yum用不了,yum升級
yum升級
1.-- 下載yum安裝文件
sudo wget https://mirrors.edge.kernel.org/centos/6/os/x86_64/Packages/yum-metadata-parser-1.1.2-16.el6.x86_64.rpm
sudo wget https://mirrors.edge.kernel.org/centos/6/os/x86_64/Packages/yum-plugin-fastestmirror-1.1.30-41.el6.noarch.rpm
sudo wget https://mirrors.edge.kernel.org/centos/6/os/x86_64/Packages/python-iniparse-0.3.1-2.1.el6.noarch.rpm
sudo wget https://mirrors.edge.kernel.org/centos/6/os/x86_64/Packages/python-urlgrabber-3.9.1-11.el6.noarch.rpm
sudo wget https://mirrors.edge.kernel.org/centos/6/os/x86_64/Packages/yum-3.2.29-81.el6.centos.noarch.rpm
sudo wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-6.repo
2.-- 查看yum
rpm -qa |grep yum
rpm -qa |grep python-urlgrabber
PackageKit-yum-plugin-0.5.8-21.el6.x86_64
PackageKit-yum-0.5.8-21.el6.x86_64
yum-metadata-parser-1.1.2-16.el6.x86_64
yum-plugin-security-1.1.30-14.el6.noarch
yum-utils-1.1.30-14.el6.noarch
yum-rhn-plugin-0.9.1-48.el6.noarch
3.--卸載yum
sudo rpm -aq |grep yum|xargs sudo rpm -e --nodeps
sudo rpm -qa |grep python-urlgrabber|xargs sudo rpm -e --nodeps
3.--安裝yum
sudo rpm -ivh python-urlgrabber-3.9.1-11.el6.noarch.rpm
sudo rpm -ivh yum-*
4.清除原有緩存
sudo yum clean all
5.重建緩存,以提高搜索安裝軟件的速度
sudo yum makecache
6.更新系統
sudo yum update
[Errno 14] Could not open/read file:///sysbak/Redhat6.5/repodata/repomd.xml
RHEL更換yum源的 PYCURL ERROR 22錯誤解決方法
[weblogic@V7APPtest1 ~]$ sudo yum install curl-devel expat-devel gettext-devel openssl-devel zlib-devel gcc perl-ExtUtils-MakeMaker
Loaded plugins: product-id, refresh-packagekit, security, subscription-manager
This system is not registered to Red Hat Subscription Management. You can use subscription-manager to register.
file:///sysbak/Redhat6.5/repodata/repomd.xml: [Errno 14] Could not open/read file:///sysbak/Redhat6.5/repodata/repomd.xml
Trying other mirror.
Error: Cannot retrieve repository metadata (repomd.xml) for repository: base. Please verify its path and try again
redhat 6.5 下載新的CentOS-Base.repo
https://jingyan.baidu.com/album/fedf073766733935ac897732.html?picindex=16
編譯安裝git
git --version
1.卸載舊版本git:
yum remove git
2. 執行命令:
yum install curl-devel expat-devel gettext-devel openssl-devel zlib-devel gcc perl-ExtUtils-MakeMaker
3. 下載git,解壓:
wget https://github.com/git/git/archive/v2.24.0.tar.gz
tar -zxf git-2.24.0.tar.gz
4. 進入解壓后的git安裝目錄,編譯,安裝:
cd git-2.24.0
make prefix=/usr/local/git all
make prefix=/usr/local/git install
5. 編輯環境變量配置(給到所有用戶):
vim /etc/profile
export PATH=$PATH:/usr/local/git/bin
source /etc/profile