# Write the SSH-KEY to the disk
fs.writeFile "/cgrepos/.ssh/#{repo.id}.pub", repo.public_key, (err) ->
throw err if err
fs.writeFile "/cgrepos/.ssh/#{repo.id}", repo.private_key, (err) ->
throw err if err
exec "chmod 400 /cgrepos/.ssh/#{repo.id} && eval `ssh-agent -s` && ssh-add /cgrepos/.ssh/#{repo.id}", (error) ->
throw error if error
# First, delete the git repo on the hard drive, if it exists
exec "rm -rf #{git_location}", options, (error) ->
throw error if error
# Second, clone the repo into the location
console.log "Cloning repo #{repo.id}: #{repo.repo_name} into #{git_location}. This could take a minute"
exec "git clone #{repo.url} #{git_location}", options, (error) ->
throw error if error
我正在节点中尝试(coffee
用于那些很棒的)。但是由于某种原因,当它运行时,它给了我一个错误:Error: Command failed: conq: repository access denied. deployment key is not associated with the requested repository.
不知道我做错了什么。如果我直接从命令行运行这些命令,一切似乎都正常。有任何想法吗?