【问题标题】:TeamCity Build Erroring Out while doing Git PushTeamCity Build 在执行 Git Push 时出错
【发布时间】:2021-03-27 14:38:35
【问题描述】:

我有基于命令行的 teamcity 构建步骤。我的目标是,我想使用团队城市构建步骤中的 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

以下 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

执行构建后,我收到以下错误

    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

【问题讨论】:

  • 手动 git 操作需要明确的手动授权。不管是登录名+密码还是 ssh 密钥。

标签: gitlab teamcity gitlab-ci-runner teamcity-8.0


【解决方案1】:

验证您的机器中是否有正确的 ssh 密钥。

【讨论】:

    猜你喜欢
    • 2018-10-29
    • 2021-09-13
    • 1970-01-01
    • 2014-11-11
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2010-10-31
    • 2020-05-26
    相关资源
    最近更新 更多