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

Error running git pull --ff-only --no-edit origin on Jenkins Server #74

Open
TheLarkInn opened this issue Mar 13, 2017 · 2 comments
Open
Labels

Comments

@TheLarkInn
Copy link

Hi all!!! I came across an issue where when running:

lerna-semantic-release pre && lerna-semantic-release post && lerna-semantic-release perform on my JenkinsCI server, I would receive the following error:

�[31merror�[39m:   
�[32minfo�[39m:    Executing pullCommits in root
�[32minfo�[39m:    + git pull --ff-only --no-edit origin
Permission denied (publickey).
fatal: Could not read from remote repository.

Please make sure you have the correct access rights
and the repository exists.
�[32minfo�[39m:    ret > 1
�[32minfo�[39m:    err >  Permission denied (publickey).
fatal: Could not read from remote repository.

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

I believe I have correctly configured Jenkins access keys as it is connecting via SSH to a bitbucket server repository for these builds to trigger. I'm sure I could be doing something incorrectly or need to modify a Jenkins configuration but not sure where to start.

@jpnelson
Copy link

Hi! Thanks for the question.

I haven't used JenkinsCI with lerna-semantic-release but it should certainly be possible to configure. It looks like an authentication issue – lerna-semantic-release needs to push back to the repo from which the build was run, which is unique to most tools like this it seems (bitbucket pipelines and travis ci, at least).

https://github.com/atlassian/lerna-semantic-release/blob/caribou/.travis/before_install.sh#L20 has some steps that may assist in your jenkins setup – git will need to be setup to have authentication to push back to the original repo. We use git config credential.helper store to avoid accidentally logging the username and token in the lerna-semantic-release logs.

If you have any other issues with JenkinsCI it'd be interesting to hear back so that people can be aware of any potential difficulties. Thanks!

@enriquecaballero
Copy link

It will not run on Jenkins because for some reason this package requires you to be on master. We got past the pull step with the --dont-pull flag but got caught by the other steps. Jenkins is never on master but on a ref. What's a good workaround for this?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants