Comments (18)
Had the same issue configuring a deploy key through the API.
Basically we were adding the same key twice and the second addition was failing with this error.
It turns out the issue came from the comment part of the key that was containing spaces (e.g: ssh-rsa xxx== coment with spaces
)
Removing the key's comment before adding it solved the issue.
from gitlabform.
The fix in v3.3.1 resolves the issue for me. Please try it out and let me know about your results!
from gitlabform.
Haven't seen this since #1 has been implemented. Closing it then.
from gitlabform.
Hey. A similar problem on v4.
Added a key to a group with 2 projects. As a result, the key was added only to 1 project, and then the error.
failed - expected code(s) [201], got code 400 & body: 'b'{"message":{"deploy_key.fingerprint":["has already been taken"]}}''
common_settings:
..deploy_keys:
....rsa-key-20201022-ssh:
......key: "ssh-rsa AAAAB3NzaC1yc2EAAAABJQAAAgEA5y29aeWBhSFNBwopdzN (...) rsa-key-20201022"
........title: rsa-key-20201022-ssh
..........can_push: false
command:
gitlabform test_12.10.6
test_12.10.6
- name of group
from gitlabform.
Thanks @razumv ! I’ll try to reproduce it.
from gitlabform.
I was not able to reproduce it on the latest GitLab 13.5.1 with a simple test I added in #131 .
What GitLab and GitLabForm versions are you using, @razumv ?
from gitlabform.
I see this too on 13.8.4-ee
. In my case I am trying to add a deploy key already defined in other projects from another group.
failed - expected code(s) [201], got code 400 & body: 'b'{"message":{"deploy_key.fingerprint":["has already been taken"]}}''
from gitlabform.
I see this on GitLab 13.12.5-ee
with GitLabForm v1 as well. Can't assign two projects with the same deploy key.
from gitlabform.
@jccl : please try using v2. v1 is not supported anymore.
Generally I still cannot reproduce this issue with the latest v2.1 and latest stable Gitlab, see https://github.com/egnyte/gitlabform/runs/2978563292?check_suite_focus=true .
from gitlabform.
I appear to have this same issue - We are running Gitlab 14.0.5-ee , running 2.1.1 of Gitlabform.
In my scenario, I created a new deploy key that I applied to a single project, then configured gitlabform to push it over a group. All projects failed, so I removed the key.
I ran gitlabform again, which applied the key to one project, then failed for the remainder with HTTP 400: {"fingerprint":["has already been taken"]}
Please let me know if I can provide any more detail
from gitlabform.
Thanks @owindsor ! This may allow me to reproduce it but I have a few more questions.
What do you mean by "All projects failed, so I removed the key."? Was that single project that had this key already part of that group? How did all the projects fail? How did you remove the key?
from gitlabform.
@gdubicki The process that I followed was;
- Manually create a key and assign it to a single project.
- Discover gitlabform, install and create a config to apply to all projects in the group, execute and receive the 'fingerprint' error. The group contains 65 projects in total.
- Manually remove the key from the project, then use gitlabform to apply across the full group. A single project in the group got the key, the other 64 complained with the 'fingerprint' error.
My takeaway was that the application can work (at least for a single project) so my configs and tokens were valid.
from gitlabform.
I have checked this and frankly I am surprised that the current trivial code works at all, dealing successfully with many kinds of edge cases that you can encounter with deploy keys and failing only rarely. :/ This will require quite a lot of work to make it bullet-proof. Any volunteers? PR are welcome.
from gitlabform.
same problem on 14.0.10-ee
from gitlabform.
Can you please check if you still have this issue after upgrading to v2.10.0, @vchepkov / @FlorianLudwig / @jccl / @jocado / @razumv ?
from gitlabform.
I noticed myself that the issue does still exist with the latest gitlabform. :(
from gitlabform.
Thanks @jpiron. I noticed this again in my GitLab instance and the new SSH key does not have spaces in the comment...
from gitlabform.
...but what you wrote about adding a comment with spaces enabled me to finally reproduce it with 100% reproducibility in a test, so thanks for that! :) Now I can work on finally getting this resolved.
from gitlabform.
Related Issues (20)
- Add `enforce` support for `hooks` configuration HOT 3
- Add support for member_role_id HOT 7
- Is there a way to manage CI/CD settings at project level for "Keep artifacts from most recent successful jobs" using gitlab forms. HOT 3
- black formatting issue after upgrading markupsafe to version 2.1.4
- Entities marked as delete are remove and then added again when not present HOT 3
- 3.9.0 appears to break while setting a project webhook with a token HOT 8
- Transfer project does not work when gitlabform run with ALL_DEFINED or ALL as the target HOT 2
- Uploading Project Avatar HOT 6
- Merge request approvals settings of group HOT 4
- Feature Flags support HOT 5
- Add retry feature HOT 2
- CI/CD settings: Whitelist project for Token Access HOT 1
- merge_requests_approval_rules does not respect protected_branches and breaks execution HOT 8
- [backward incompatible] Add ENTRYPOINT to the Dockerfile HOT 1
- Project transfer failing with --noop
- Error when output file flag is used with dry-run project transfer
- Add your company logo and link to the users list!
- Processing group fails if it has more than 20 members
- Add support for adding a single deploy key to multiple projects in a namespace/group as a non-administrator HOT 3
- Add 'enforce' support for integrations config HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from gitlabform.