-
Notifications
You must be signed in to change notification settings - Fork 67
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
Add implementation of libgit2 (Follow configuration from source-controller) #71
Comments
@Nordes this will probably be done as image automation controller reaches an official release. It was a lot of work getting libgit2 in place for source-controller as it still has to work with the original library. Adding it now might probably make the development slower as it reaches the finish line. I know that you are on vacation @squaremo so whenever you get back and see this can you comment if you have any thoughts on the matter :) |
Thanks a lot for the update and all your work :). Once it's done, I will be able to upgrade from V1 to V2 ;). |
@phillebaba Is there a possibility that only clones need to go through the libgit2 path, while commits and pushes can still be done by go-git? (My guess is that push involves the same bits of protocol that clone does, that is the bits that don't work in go-git+Azure ...) |
As the the error is the same I had when the clone was failing (before it was fixed to use go-git). I guess the same protocol is used for push. Which is a bit a pity (Azure Devops). |
So I have spent some time debugging different git clients with Azure Devops and my experience has been that Azure Devops will reject any gitwire protocol request (https and ssh) that does not advertise the correct capabilities in the first handshaking part. So basically I do not think it is possible to commit with go-git. |
@squaremo: I know this have been closed already. I was only able now to go back and test it. I was wondering why the checkout was not working? I can see the PR and the code change ( {"level":"error","ts":"2021-02-04T15:59:24.072Z","logger":"controller-runtime.manager.controller.imageupdateautomation","msg":"Reconciler error","reconciler group":"image.toolkit.fluxcd.io","reconciler kind":"ImageUpdateAutomation","name":"flux-system","namespace":"flux-system","error":"unable to clone 'ssh://git@ssh.dev.azure.com/v3/MyOrg/Proj/My.Flux.Configuration', error: user cancelled hostkey check"} My SSH key and git repository are properly configured since the source-controller is able to fetch the content and deploy updates through the libgit2 gitImplementation. So, the hosts file must also be ok and that error should not happen. Any ideas? |
@squaremo @Nordes │ Conditions: │
│ Last Transition Time: 2021-02-05T17:27:30Z │
│ Message: unable to clone 'ssh://XXX@vs-ssh.visualstudio.com/v3/XXX/XXX/XXX', error: user cancelled hostkey check │
│ Reason: ReconciliationFailed │
│ Status: False │
│ Type: Ready │
│ Observed Generation: 1 │
│ Events: │
│ Type Reason Age From Message │
│ ---- ------ ---- ---- ------- │
│ Normal error 4m21s (x334 over 3d15h) image-automation-controller unable to clone 'ssh://XXX@vs-ssh.visualstudio.com/v3/XXX/XXX/XXX', error: user cancelled hostkey check Is there any information I can extract, that might help you with this? |
@containerpope please open a new issue |
@stefanprodan no problem, please see: #106 |
Now on source-controller we can create a
gitrepository
resource for azure using implementationlibgit2
. Related bug (closed) is fluxcd/source-controller#104Example:
flux create source git flux-system \ --git-implementation=libgit2 \ --secret-ref=git-ssh-key \ --url=ssh://git@ssh.dev.azure.com/v3/org/collection/my_flux_repository \ --branch=main \ --interval=1m
When the image-automation-controller try to get from git, it fails since it's not following the git-implementation directive.
It would be very nice to be able to have the full flow working. (Adding flux -to- auto-update)
Right now the error is as below:
Images:
source-controller:v0.5.4
image-automation-controller:v0.1.0
image-reflector-controller:v0.1.0
The text was updated successfully, but these errors were encountered: