简体   繁体   中英

TeamCity Build Erroring Out while doing Git Push

I have teamcity build steps which is based on command line. My objective is, I want to upload code into gitlab using the git commands from team city build steps Below are my commands:

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 -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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM