简体   繁体   中英

TeamCity and Git

I'm having trouble setting up Teamcity and Git. I have a git repo checked out to a directory. My "clone repository to" setting in Teamcity VCS root is set to the same directory. When I run the build, I get the error

The ref 'refs/heads/master' could not be resolved 

Apparently because it deleted the .git directory, and/or possibly moved the files in /.git to the parent directory.

I'm obviously misunderstanding some part of this process, but which? Thanks.

Try leave "Clone repository to" field empty, it should work this way. "Clone repository to" points to the directory where TeamCity clones remote repository. If you leave it empty TeamCity will use default location (folder inside ~/.BuildServer/system/caches/git). I think an error occurs because before cloning, TeamCity cleans up specified dir.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM