cannot clone from stash

richard's Avatar


04 Apr, 2015 01:39 PM


I'm trying to import a project from Stash. AppVeyor connected successfully to stash, it fetches the available repositories. However, when I try to build a repository it does a git clone but "hangs" forever. Eventually the build times out (40 min). No error message is given.

Some things I have tried:

- Instead of using AppVeyor's Stash integration I have tried to just add it as a Git repository. This gives the same effect.
- I can clone the repository to my local computer.
- I can clone the repository to Bitbucket from Stash (using Bitbuckets direct import functionality).

Hope you guys can help me out here and point me in the right direction. Thanks!

  1. Support Staff 1 Posted by Feodor Fitsner on 04 Apr, 2015 07:40 PM

    Feodor Fitsner's Avatar

    Hi Richard,

    Do you use username/password to clone the repo or SSH key?

  2. 2 Posted by richard on 04 Apr, 2015 07:51 PM

    richard's Avatar

    Hi Feodor,

    I've tried both Oauth as username/password, but it doesn't make a difference. This is the console when choosing Basic authentication:

    Build started
    git clone -q --branch=master C:\projects\tst-5lng2
    Warning: Permanently added ','123.456.789.123 (ECDSA) to the list of known hosts.

  3. Support Staff 3 Posted by Feodor Fitsner on 04 Apr, 2015 07:53 PM

    Feodor Fitsner's Avatar

    Interesting. Have you tried looking in RDP what's going on:

  4. 4 Posted by richard on 04 Apr, 2015 08:29 PM

    richard's Avatar

    I don't know how to run that script before the git clone starts. I've tried before_build: in the appveyor.yml but that comes after the clone which is the problem. Sorry, I'm new to this!

  5. Support Staff 5 Posted by Feodor Fitsner on 04 Apr, 2015 08:34 PM

    Feodor Fitsner's Avatar

    You can run it in init which runs before clone.

    When you get there via RDP you can just re-run git clone to see why it's getting stuck.

  6. 6 Posted by richard on 04 Apr, 2015 09:08 PM

    richard's Avatar

    Ok, I was able to rdp into the server. The problem is that a default installation of Stash runs his ssh service on port 7999. I added the port to .ssh/config and the clone worked.

    I guess I can do this with a init script each build, but I think a lot of users who will use Stash out of the box will run into this issue?

  7. Support Staff 7 Posted by Feodor Fitsner on 04 Apr, 2015 09:15 PM

    Feodor Fitsner's Avatar

    Nice finding! Yes, creating config in init should work. Regarding default port 7999 - it's hard to say what's better by default - the first thing I did after installing Stash was moving SSH to port 22 because 7999 looked so unnatural.

    It would be great though if you post your script/solution for modifying config here and we leave this discussion public so others could easily find it.

  8. 8 Posted by richard on 07 Apr, 2015 02:19 PM

    richard's Avatar

    I've added the following to my init script:

    Add-Content "$home\.ssh\config" "Host *`n    Port 7999"

    I agree that changing the port to 22 is more elegant.

  9. Support Staff 9 Posted by Feodor Fitsner on 07 Apr, 2015 05:15 PM

    Feodor Fitsner's Avatar

    Thank you!

  10. Ilya Finkelshteyn closed this discussion on 25 Aug, 2018 01:55 AM.

Comments are currently closed for this discussion. You can start a new one.

Keyboard shortcuts


? 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