我正在尝试使用groovy管道语法将一些更改推送到git存储库。但是我无法推动。谁能在这里帮助我。
管道语法:
sh '''
#git checkout pkg_version
touch README
git add .
git status
git commit -m "Updated Package Version"
git remote -v
sshagent(credentialsId) {
git push origin pkg_version
}
#git push origin pkg_version
'''
詹金斯错误:
origin ssh://jenkins@gerrit:29418/sfdx_nar (fetch)
origin ssh://jenkins@gerrit:29418/sfdx_nar (push)
+ git push origin pkg_version
Permission denied (publickey).
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.
[Pipeline] }
答案 0 :(得分:1)
尝试在管道中像这样使用SSHAgent:
<?xml version="1.0" encoding="utf-8" ?>
<controls:ViewPage xmlns="http://xamarin.com/schemas/2014/forms"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
x:Class="XXXX.ActOverviewView"
xmlns:controls="XXXX"
</controls:ViewPage>