Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Permission denied, please try again #40

Closed
EvoIos opened this issue May 24, 2018 · 2 comments
Closed

Permission denied, please try again #40

EvoIos opened this issue May 24, 2018 · 2 comments

Comments

@EvoIos
Copy link

EvoIos commented May 24, 2018

macOS 10.12.6, docker / agent 已启动。

执行 git clone 时报错了

git clone --branch master --single-branch git@gitlab.txooo.cc:aaa/xxx.git xxx.xcworkspace

提示:

Home dir: /root
Cloning into 'aaa'...
Permission denied, please try again.
Permission denied, please try again.
Permission denied (publickey,gssapi-keyex,gssapi-with-mic,password).
fatal: Could not read from remote repository.

Please make sure you have the correct access rights
and the repository exists.

目录:/Users/z/flow-ci/data/workspace 下文件

drwxr-x---  3 z  staff  102  5 24 11:01 Test
drwxr-x---  5 z  staff  170  5 24 14:54 aaa-Adhoc
drwxr-x---  3 z  staff  102  5 24 14:59 credentials
drwxr-x---  3 z  staff  102  5 24 15:00 test_ssh

不通过 flowCI,在別的地方手动执行下面命令不会报错

git clone --branch master  --single-branch git@gitlab.txooo.cc:aaa/xxx.git xxx.xcworkspace
@EvoIos
Copy link
Author

EvoIos commented May 24, 2018

yaml 配置文件

# flow.ci templates
flow:
  - envs:
      FLOW_WELCOME_MESSAGE: "start"
      FLOW_AGENT_WORKSPACE: "${HOME}/agent-workspace"
      FLOW_ENV_OUTPUT_PREFIX: "IOS_OUTPUT_,FLOW_AGENT_WORKSPACE"
      IOS_PROJECT_NAME: "aaa"
      IOS_SCHEME: "aaa"
      IOS_EXPORT_METHOD: "ad-hoc"
      IOS_IPA_DIR: "./jenkin_build"
      
    steps:
      - name: Init
        script: |
          echo ${FLOW_WELCOME_MESSAGE}
      - name: Git Clone
        script: |
          echo "Home dir: "  ${HOME}
          rm -r -f ${IOS_PROJECT_NAME}
          #export GIT_SSH_COMMAND="ssh -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no"
          git clone --branch ${FLOW_GIT_BRANCH} --single-branch ${FLOW_GIT_URL} ${IOS_PROJECT_NAME}
          export FLOW_AGENT_WORKSPACE=${FLOW_AGENT_WORKSPACE}/${IOS_PROJECT_NAME}
          echo "flow_agent_workspace" ${FLOW_AGENT_WORKSPACE}

@EvoIos
Copy link
Author

EvoIos commented May 25, 2018

在最最最前面把 key 添加到系统里。

steps 如下

      - name: Init
        script: |
          ssh-add -K ~/.ssh/id_rsa

@EvoIos EvoIos closed this as completed May 25, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant