#694  Build: Checkout step: Caching the "checkout path" results in git error on subsequent builds
Released
jbauer opened 2 years ago

When having a build step of type Checkout and setting the checkout path to a sub directory of the workspace, that sub directory can now be cached between builds. This is useful to speed up checkouts of large projects with many files.

However when doing so, the Checkout step fails on subsequent builds because it tries to add a git remote that is already present (because the directory was cached).

13:37:04 Running step "Checkout"...
13:37:04 Checking out code...
13:37:05 RSA host key for IP address '.......' not in list of known hosts.
13:37:05 fatal: remote origin already exists.
13:37:05 Step "Checkout" is failed: Failed to run command: git remote add origin ssh://onedev.example.com:6611/test-project, return code: 128
fatal: remote origin already exists.
13:37:05 Step "Build" is skipped
OneDev changed state to 'Closed' 2 years ago
Previous Value Current Value
Open
Closed
OneDev commented 2 years ago

State changed as code fixing the issue is committed

OneDev changed state to 'Released' 2 years ago
Previous Value Current Value
Closed
Released
OneDev commented 2 years ago

State changed as build #2566 is successful

issue 1 of 1
Type
Bug
Priority
Normal
Assignee
Affected Versions
Not Found
Issue Votes (0)
Watchers (4)
Reference
onedev/server#694
Please wait...
Page is in error, reload to recover