その構成でPythonスクリプトを呼び出すJenkinsジョブがあります。スクリプトはいくつかのファイルを作成して実行git add path/to/new/filesし、git commit -m "foobar"次にgit push -u origin my_branch。そのスクリプトをローカルで呼び出すと、必要なファイルが追加され、そのブランチにプッシュされます。Jenkinsジョブがそのスクリプトを呼び出すとgit push、エラーが返されます。
error: src refspec my_branch does not match any.
error: failed to push some refs to 'git@example.com:my_project.git'
それはなぜですか?git pull後でファイルを作成できるようにする必要があります。