getsops / sops

Simple and flexible tool for managing secrets
https://getsops.io/
Mozilla Public License 2.0
16.85k stars 876 forks source link

Error: cannot parse "'2020-09-01T20:41:15Z'" as "2006" #814

Open fbongiovanni29 opened 3 years ago

fbongiovanni29 commented 3 years ago

When running the following:

 sops --decrypt --input-type dotenv --output-type dotenv cloudbuild.bdt-eng-stage.enc.envs

I get:

parsing time "'2020-09-01T20:41:15Z'" as "2006-01-02T15:04:05Z07:00": cannot parse "'2020-09-01T20:41:15Z'" as "2006"

Can't figure out what I'm doing wrong

autrilla commented 3 years ago

Can you share your file, or a way to reproduce this error? It seems there's some extra quotes around the dates in your file.

On Wed, Feb 10, 2021 at 6:44 PM Francis Bongiovanni < notifications@github.com> wrote:

When running the following:

sops --decrypt --input-type dotenv --output-type dotenv cloudbuild.bdt-eng-stage.enc.envs

I get:

parsing time "'2020-09-01T20:41:15Z'" as "2006-01-02T15:04:05Z07:00": cannot parse "'2020-09-01T20:41:15Z'" as "2006"

Can't figure out what I'm doing wrong

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/mozilla/sops/issues/814, or unsubscribe https://github.com/notifications/unsubscribe-auth/AARH4V2LVWHSJZIO5TTXKMLS6LAZTANCNFSM4XNME5XQ .

fbongiovanni29 commented 3 years ago

@autrilla thanks for responding, the file looks like this:

benefits_launch_api_key='ENC[AES256_GCM,data:<REDACTED>,type:str]'
portfolio_identity_service_api_key='ENC[AES256_GCM,data:<REDACTED>,type:str]'
sops_unencrypted_suffix='_unencrypted'
sops_version='3.6.0'
sops_gcp_kms__list_0__map_created_at='2020-09-01T20:41:14Z'
sops_gcp_kms__list_0__map_enc='CiQAfOBZLrl23WwLAxidr+YsCap7oSS9KtPSfLwoiU+KARo2XwMSSACEui/Kh7+I5KsrBgrGohIRWDbttRJHUylv9JUqf+X4NQ0I1afvpneJzTT0+BC39mwhmas/7hBCwouMuMpZfXNVK9uND3zpZg=='
sops_gcp_kms__list_0__map_resource_id='projects/bdt-eng-stage/locations/global/keyRings/bdt-sops/cryptoKeys/community_prism'
sops_lastmodified='2020-09-01T20:41:15Z'
sops_mac='ENC[AES256_GCM,data:<REDACTED>,type:str]'

I redacted some of it, not sure if it was safe to post

fbongiovanni29 commented 3 years ago

Weird, when I removed all the single quotes from the file it worked. Not sure how they got there in the first place

lentzi90 commented 3 years ago

Same problem here and same solution also.

mdutton3 commented 3 years ago

We saw this issue as well with v3.6.0 adding extra single quotes. Moving to v3.6.1 fixed it for us.