简体   繁体   English

执行 Git 推送时 TeamCity 构建出错

[英]TeamCity Build Erroring Out while doing Git Push

I have teamcity build steps which is based on command line.我有基于命令行的 teamcity 构建步骤。 My objective is, I want to upload code into gitlab using the git commands from team city build steps Below are my commands:我的目标是,我想使用来自团队城市构建步骤的 git 命令将代码上传到 gitlab 以下是我的命令:

git config --global user.name "username"

git config --global user.email "username@gmail.com"

git init
ssh -T git@gitlab.com

git checkout -b new_code7

below curl download file下面curl下载文件

curl -u %OIC_USERNAME%:%OIC_USERPASSWORD_TEST% \
    -H "Content-Type:octet-stream"  -X GET -o newintegration.iar \
    %OIC_TEST_INSTANCE%/ic/api/integration/v1/integrations/BX_AR_RECEIPTS_INBOUND_INT%7C01.00.0001/archive

git add .

git commit -m "adding code to master2" 

git push origin new_code7

After build is executed I am receiving following error执行构建后,我收到以下错误

    0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
  100    11  100    11    0     0     25      0 --:--:-- --:--:-- --:--:--    25
  /mnt/agent/work/48738e7d1b6529be/src
  100    11  100    11    0     0     25      0 --:--:-- --:--:-- --:--:--    25

  newintegration.iar

  On branch new_code7

  nothing to commit, working tree clean

  Warning: Permanently added 'gitlab.com,172.65.251.78' (ECDSA) to the list of known hosts.

  git@gitlab.com: Permission denied (publickey,keyboard-interactive).
  fatal: Could not read from remote repository.

  Please make sure you have the correct access rights

  and the repository exists.

  Process exited with code 128

Verify that you have the correct ssh key in your machine.验证您的机器中是否有正确的 ssh 密钥。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 TeamCity GIt实验室合并请求未触发构建 - TeamCity GIt lab merge request not triggering a build 创建一个构建文件git push gitlab ci - Create a build file git push gitlab ci 执行 Git 推送 Laravel 时不包含存储链接 - Storage link is not included when doing a Git push Laravel Gitlab在为git用户推送时提示输入密码 - Gitlab prompts for password while push for git user 如何将 git 推送到两个存储库,而 git 从一个存储库拉取 - How to git push to two repositories while git pull from one repository 詹金斯(Jenkins)在gitlab的构建推送更改中列出了Git Changes作为标签发行说明 - Jenkins lists Git Changes on build push changes to gitlab as tag release notes 基于提交更改的 teamcity 构建的 gitlab webhook - gitlab webhook for teamcity build based on commit change 已构建 apk 时如何在执行 Firebase 应用程序分发时跳过应用程序构建过程 - How to skip app build process while doing Firebase app distribution when the apk is already built 在使用git将其推出之前,是否应该始终从所在的分支中拉出 - Should you always pull from the branch that you are on before you push it out using git 为什么 Gitlab CI 无法获取 git 子模块,但在随后的推送中检查出子模块? - Why does Gitlab CI fail to get git submodule but on subsequent push checks out the submodule?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM