Skip to content
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

exporting and then importing results in the server does not support credential metadata, requires >= 2.6.x error #104

Closed
jtarchie opened this issue Aug 27, 2020 · 2 comments

Comments

@jtarchie
Copy link
Contributor

jtarchie commented Aug 27, 2020

What version of the credhub server you are using?

1.9.3

What version of the credhub cli you are using?

$ credhub --version
CLI Version: 2.8.0
Server Version: 0.0.0

If you were attempting to accomplish a task, what was it you were attempting to do?

With the current CLI (2.8.0), when we credhub export and then credhub import we receive an error on many credentials of the server does not support credential metadata, requires >= 2.6.x.
It appears that the export includes an empty field for each credential of metadata: {}.
The import is then not able to use this and errors on the import.

What did you expect to happen?

Not to receive this error.
Most likely, credhub export would export a field that is unsupported by the server it is exporting from.

What was the actual behavior?

This error message on every credential trying to be imported -- the server does not support credential metadata, requires >= 2.6.x

The 2 that we manually added, which did not have the metadata: {} worked. As can be seen in the following output.

Example output:

Import complete.
Successfully set: 2
Failed to set: 123
.... more of the same ...
 - Credential '/concourse/main/abrown-deploy-key' at index 113 could not be set: the server does not support credential metadata, requires >= 2.6.x
 - Credential '/concourse/main/networking_poe_ssl_certs' at index 114 could not be set: the server does not support credential metadata, requires >= 2.6.x
 - Credential '/concourse/main/s3_access_key_id' at index 115 could not be set: the server does not support credential metadata, requires >= 2.6.x
 - Credential '/concourse/main/docs-ref-pipeline-repo-uri' at index 116 could not be set: the server does not support credential metadata, requires >= 2.6.x
 - Credential '/concourse/main/docs-ref-pipeline-repo-key' at index 117 could not be set: the server does not support credential metadata, requires >= 2.6.x
 - Credential '/concourse/main/s3_region_name' at index 118 could not be set: the server does not support credential metadata, requires >= 2.6.x
 - Credential '/concourse/main/s3_pivnet_products_bucket' at index 119 could not be set: the server does not support credential metadata, requires >= 2.6.x
 - Credential '/concourse/main/s3_secret_access_key' at index 120 could not be set: the server does not support credential metadata, requires >= 2.6.x
 - Credential '/ab-opsman-ssh-key' at index 121 could not be set: the server does not support credential metadata, requires >= 2.6.x
 - Credential '/concourse/main/reference-pipeline-development/vsphere_ssh_key' at index 122 could not be set: the server does not support credential metadata, requires >= 2.6.x
 - Credential '/concourse/main/reference-pipeline-development/opsman-ssl' at index 123 could not be set: the server does not support credential metadata, requires >= 2.6.x
 - Credential '/concourse/main/reference-pipeline/opsman-ssl' at index 124 could not be set: the server does not support credential metadata, requires >= 2.6.x
One or more credentials failed to import.
@cf-gitbot
Copy link

We have created an issue in Pivotal Tracker to manage this:

https://www.pivotaltracker.com/story/show/174536502

The labels on this github issue will be updated when the story is started.

peterhaochen47 added a commit that referenced this issue Sep 3, 2020
- this change is consistent with the behavior of `credhub get`
- to fix "server does not support credential metadata" error when
exporting creds from & importing back into an old version of credhub
server that does not support metadata

[#174536502]
[Issue #104]
peterhaochen47 added a commit that referenced this issue Sep 3, 2020
- this change is consistent with the behavior of `credhub get`
- to fix "server does not support credential metadata" error when
exporting creds from & importing back into an old version of credhub
server that does not support metadata

[#174536502]
[Issue #104]
peterhaochen47 added a commit that referenced this issue Sep 3, 2020
- this change is consistent with the behavior of `credhub get`
- to fix "server does not support credential metadata" error when
exporting creds from & importing back into an old version of credhub
server that does not support metadata

[#174536502]
[Issue #104]
@peterhaochen47
Copy link
Member

Fixed by #105. Will be released in the next version of cli. Thanks for reporting the issue!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants