Password prompt when buildg from bitbucket server.
Hiya forum,
I get a password prompt when trying to build a project stored at bitbucket server. I have connection to the bitbucket (could add the project). What is wrong with my settings?
Here my appveyor.yml
configuration: Release
# restore packages before running MSBuild
before_build:
- nuget restore
# package Web Application project for Web Deploy
build:
verbosity: minimal
publish_wap: true
here is the message:
Build started
git clone -q --branch=master git@<code>:<project>/<project>.git /home/appveyor/projects/<project>-<code>
git@bitbucket.<domain>.<domain>'s password:
Where does the username git comes from? I didn't set anything like that.
Comments are currently closed for this discussion. You can start a new one.
Keyboard shortcuts
Generic
? | Show this help |
---|---|
ESC | Blurs the current field |
Comment Form
r | Focus the comment reply box |
---|---|
^ + ↩ | Submit the comment |
You can use Command ⌘
instead of Control ^
on Mac
Support Staff 1 Posted by Feodor Fitsner on 15 Jan, 2021 05:07 AM
What is
<code>
in your URL? It should be host name.If it's a private repository AppVeyor should add an SSH key to the repository when you add a new project. Was it added in your case? If not, try configuring it manually. You can find a public key on "General" tan of project settings.
2 Posted by marcel.sottnik on 15 Jan, 2021 10:37 AM
Hi Feodor,
the key is properly created in the repository access keys and is the same as the one in General tab. The user git is existing on the bitbucket and has rights to the repository. The code is an alphanumeric code, no hostname. Appveyor and bitbucket are on the same server, but the configured links points on the public address. But sitll, I could make a link to bitbucket as I could link the project directly from there.
Support Staff 3 Posted by Feodor Fitsner on 16 Jan, 2021 04:09 AM
Alright, I see it's a self-hosted AppVeyor Server installation. To clone a repo via SSH AppVeyor should create
~/.ssh/config
file and put a private RSA key into~/.ssh
directory. Check what you have in those files. Try cloning manually to see if that works with those keys/settings. Also, make suressh.exe
is in PATH.4 Posted by marcel.sottnik on 17 Jan, 2021 12:46 AM
So the problem is, that there is missing option for the ssh port in the entry created in .ssh/config file by appveyor. The bitbucket server git over ssh is different from the standard system sshd and the port for it cannot be the standard one. It seems the option for the port should be added in the appveyor.
It's probably also practical to be able to specify the user under which appveyor clones the repo.
Currently I don't see any possible workaround to this problem, because every build creates it's own entry for the connection in the .ssh/config file. So even if I change the config file manually it won't help, because after failed build it will be abandoned.
Support Staff 5 Posted by Feodor Fitsner on 17 Jan, 2021 01:00 AM
While looking through the history of support cases looks like I've found a solution.
Try configuring the following environment variable on project settings page or in
appveyor.yml
:7999
should be Bitbucket Server SSH port. Cloning URL should switch tossh://
if custom port specified.Let me know if that worked.
6 Posted by marcel.sottnik on 17 Jan, 2021 01:04 AM
Wonderful! That worked like a charm!
Support Staff 7 Posted by Feodor Fitsner on 17 Jan, 2021 01:05 AM
Cool, thanks for the update!
Feodor Fitsner closed this discussion on 19 Mar, 2021 09:03 PM.