Answer the question
In order to leave comments, you need to log in
Why is there no access to the repository during deployment?
I'm setting up a deployment for a project and ran into a problem: I
see an error
when running the scriptcap production deploy:check
INFO [16ef9c10] Running /usr/bin/env git ls-remote --heads [email protected]:test/pereezd-test.git as [email protected]
DEBUG [16ef9c10] Command: ( export GIT_ASKPASS="/bin/echo" GIT_SSH="/tmp/test/git-ssh.sh" ; /usr/bin/env git ls-remote --heads [email protected]:test/pereezd-test.git )
DEBUG [16ef9c10] Permission denied (publickey).
DEBUG [16ef9c10] fatal: Could not read from remote repository.
Please make sure you have the correct access rights
DEBUG [16ef9c10] and the repository exists.
# server-based syntax
# ======================
# Defines a single server with a list of roles and multiple properties.
# You can define all roles on a single server, or split them:
server 'ip', user: 'deployer', roles: %w{app db web}, primary: true
# server 'example.com', user: 'deploy', roles: %w{app web}, other_property: :other_value
# server 'db.example.com', user: 'deploy', roles: %w{db}
set :ssh_options, {
forward_agent: false }
# role-based syntax
# ==================
# Defines a role with one or multiple servers. The primary server in each
# group is considered to be the first unless any hosts have the primary
# property set. Specify the username and a domain or IP for the server.
# Don't use `:all`, it's a meta role.
role :app, %w{[email protected]}
role :web, %w{[email protected]}
role :db, %w{[email protected]}
set :rails_env, :production
keychain ~/.ssh/bitbucket
. ~/.keychain/`uname -n`-sh
authenticated via a deploy key.
You can use git or hg to connect to Bitbucket. Shell access is disabled.
This deploy key has read access to the following repositories:
test/test: -- [email protected]
- генерирую пару ключей
- запускаю ssh agent
- публичный ключ добавляю в битбакет
- приватный ключ добавляю в агент( ssh-add key) с вводом пароля
- пытаюсь клонировать репозиторий на сервере, хост добавляю в known_hosts, репозиторий успешно клонируется
- не закрывая ssh сессию( если закрыть, агент тоже выключится) пробую провести деплой, получаю ошибку доступа к репозиторию, проверку типа версии руби проходит корректно.
Answer the question
In order to leave comments, you need to log in
I once had a situation that the deployment script on GitHub did not see the repository through "remote origin". I had to set separately a new “remote deploy” with an explicitly specified login and password.
The situation is described here paulradzkov.com/2014/deploy_docpad_site_to_github_...
Maybe it will help.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question