2017-11-29 5 views
0

ホストされたエージェントを使用してVSTSにmavenプロジェクトをビルドしようとしています。 アーティファクトをgithubにデプロイしたいと思います。私が使用しているタスクはPowershellです。 "現在の支店の追跡情報がありません"です。 しかし、artifcatがgithubにデプロイされていますが、ビルド定義が失敗しています。エラーVSTSからGithubにアタッチする

+0

あなたが試したことについての情報を提供しないでください。 –

+0

アーティファクトをgithubにデプロイするためのpowershellスクリプトとは何ですか?そして、あなたはアーティファクトをgithub repoにコミットすることを意味しますか? –

+0

powershellスクリプト私はビルドタスクで何を与えましたか。 cd $(Build.ArtifactStagingDirectory) git init git config --global user.email "************@gmail.com" git config --global user.name "** ******* " git add *。* git commit -m"更新中 " gitリモート追加元https://ユーザ名:[email protected]/username/reponame.git git pull git push --set-upstream origin master – ANIRUDDHA

答えて

0

GitHubのレポが空でないと、あなたがコミット履歴を維持したい場合は、以下のようにスクリプトを使用することができますGitHubのレポが空であるか、あなたが必要としない場合は

cd $(Build.ArtifactStagingDirectory) 
git init 
git config --global user.name name 
git config --global user.email ***@gmail.com 
git add . 
git commit -m "update" 
git remote add origin https://username:[email protected]/username/reponame -f 
git checkout -b temp 
git checkout master 
git reset --hard origin/master 
git merge temp -X theirs --allow-unrelated-histories 
git push -u origin master 

は、コミット履歴を保つために、あなたは以下のようにスクリプトを使用することができます。

cd $(Build.ArtifactStagingDirectory) 
git init 
git config --global user.name name 
git config --global user.email ***@gmail.com 
git add . 
git commit -m "update" 
git remote add origin https://username:[email protected]/username/reponame -f 
git push -f origin master 

と標準エラーオプションに失敗の選択を解除:

enter image description here

+0

github repoを成功させることはできますか? –

関連する問題