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

Unable to parse OID - contains invalid characters #986

Open
1 task done
teamplayer3 opened this issue Dec 13, 2024 · 6 comments
Open
1 task done

Unable to parse OID - contains invalid characters #986

teamplayer3 opened this issue Dec 13, 2024 · 6 comments
Assignees
Labels
bug Something isn't working

Comments

@teamplayer3
Copy link

Is there an existing issue for this?

  • I have searched the existing issues

Description of the bug

Run git-cliff init in a fresh repo on my local machine (without git-cliff config file) and got the error ERROR git_cliff > Git error: "unable to parse OID - contains invalid characters; class=Invalid (3)". Maybe it's more an issue with libgit2. Tried it two times with a new rust project.

Steps To Reproduce

  1. Create fresh rust project with cargo init
  2. Rename branch master -> main (in second try without - same result)
  3. Add origin github repo (in second try without - same result)
  4. init commit
  5. Run git-cliff init -> Error encountered

Expected behavior

Init a fresh git-cliff config.

Screenshots / Logs

 WARN  git_cliff > "cliff.toml" is not found, using the default configuration.
 DEBUG git_cliff > Failed to get remote from repository: GitError(Error { code: -3, klass: 7, message: "config value 'branch.main.remote' was not found" })
 ERROR git_cliff > Git error: `unable to parse OID - contains invalid characters; class=Invalid (3)`

Software information

  • Operating system: Linux
  • Rust version: rustc 1.84.0-nightly (e7c0d2750 2024-10-15)
  • Project version: git-cliff 2.7.0

Additional context

No response

@teamplayer3 teamplayer3 added the bug Something isn't working label Dec 13, 2024
Copy link

welcome bot commented Dec 13, 2024

Thanks for opening your first issue at git-cliff! Be sure to follow the issue template! ⛰️

@orhun
Copy link
Owner

orhun commented Dec 13, 2024

Hello, thanks for reporting! 👋🏼

That's indeed an issue about libgit2 - can you maybe run with -vv flag and see if there is any more information about the error?

Also, is your project open source? I can also try to reproduce on my machine.

@teamplayer3
Copy link
Author

Reproduktion is very simple with the steps I included. It is starting a new cargo project, adding something and committing it. Maybe you could test it like this.

Will execute with -vv soon.

@orhun
Copy link
Owner

orhun commented Dec 14, 2024

Hmm I see the problem. I think it fails because the Git repository does not exist yet when you create a new project. --init flag should not need that requirement though... I will see what's going on.

@teamplayer3
Copy link
Author

Yes there's no git repo yet. Creating a new cargo project will init a new git repository though cargo init.

@teamplayer3
Copy link
Author

teamplayer3 commented Dec 14, 2024

`git-cliff init -vv` ``` DEBUG ureq::stream > connecting to crates.io:443 at [2600:9000:26e8:e400:c:7ed3:240:93a1]:443 DEBUG rustls::client::hs > No cached session for DnsName("crates.io") DEBUG rustls::client::hs > Not resuming any session TRACE rustls::client::hs > Sending ClientHello Message { version: TLSv1_0, payload: Handshake { parsed: HandshakeMessagePayload { typ: ClientHello, payload: ClientHello( ClientHelloPayload { client_version: TLSv1_2, random: 9c02c6636baef1613fe05e66c6e2ab010f44610c150fe55e9fb43cb7c08df972, session_id: , cipher_suites: [ TLS13_AES_256_GCM_SHA384, TLS13_AES_128_GCM_SHA256, TLS13_CHACHA20_POLY1305_SHA256, TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384, TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256, TLS_ECDHE_ECDSA_WITH_CHACHA20_POLY1305_SHA256, TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384, TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256, TLS_ECDHE_RSA_WITH_CHACHA20_POLY1305_SHA256, TLS_EMPTY_RENEGOTIATION_INFO_SCSV, ], compression_methods: [ Null, ], extensions: [ PresharedKeyModes( [ PSK_DHE_KE, ], ), CertificateStatusRequest( Ocsp( OcspCertificateStatusRequest { responder_ids: [], extensions: , }, ), ), NamedGroups( [ X25519, secp256r1, secp384r1, ], ), SignatureAlgorithms( [ ECDSA_NISTP384_SHA384, ECDSA_NISTP256_SHA256, ED25519, RSA_PSS_SHA512, RSA_PSS_SHA384, RSA_PSS_SHA256, RSA_PKCS1_SHA512, RSA_PKCS1_SHA384, RSA_PKCS1_SHA256, ], ), ExtendedMasterSecretRequest, SupportedVersions( [ TLSv1_3, TLSv1_2, ], ), SessionTicket( Request, ), ServerName( [ ServerName { typ: HostName, payload: HostName( DnsName( "crates.io", ), ), }, ], ), EcPointFormats( [ Uncompressed, ], ), KeyShare( [ KeyShareEntry { group: X25519, payload: bed974f774779656eb51210c9f06c2fd7c0df00cdfb344f5518ba84395067633, }, ], ), ], }, ), }, encoded: 010000e303039c02c6636baef1613fe05e66c6e2ab010f44610c150fe55e9fb43cb7c08df97220bdcac252a22a82e34dbe1dcadeda2757c8acb19fd55f7fe5751eaf7f7866274b0014130213011303c02cc02bcca9c030c02fcca800ff01000086002d00020101000500050100000000000a00080006001d00170018000d0014001205030403080708060805080406010501040100170000002b00050403040303002300000000000e000c0000096372617465732e696f000b00020100003300260024001d0020bed974f774779656eb51210c9f06c2fd7c0df00cdfb344f5518ba84395067633, }, } TRACE rustls::client::hs > We got ServerHello ServerHelloPayload { extensions: [ SupportedVersions( TLSv1_3, ), KeyShare( KeyShareEntry { group: X25519, payload: 98d5b9743b55a2c3597f11312b71b77f167d3acd060e3dfd8b222b02dc071530, }, ), ], legacy_version: TLSv1_2, random: 6d637e38cda4cdcd4ae570a3d547d66c49d707020b9dba219e28b365ae3de339, session_id: , cipher_suite: TLS13_AES_128_GCM_SHA256, compression_method: Null, } DEBUG rustls::client::hs > Using ciphersuite TLS13_AES_128_GCM_SHA256 DEBUG rustls::client::tls13 > Not resuming TRACE rustls::client::client_conn > EarlyData rejected TRACE rustls::conn > Dropping CCS DEBUG rustls::client::tls13 > TLS1.3 encrypted extensions: [ServerNameAck] DEBUG rustls::client::hs > ALPN protocol is None TRACE rustls::client::tls13 > Server cert is CertificateChain([CertificateDer()]) TRACE rustls::webpki::server_verifier > Unvalidated OCSP response: [48, 130, 1, 211, 10, 1, 0, 160, 130, 1, 204, 48, 130, 1, 200, 6, 9, 43, 6, 1, 5, 5, 7, 48, 1, 1, 4, 130, 1, 185, 48, 130, 1, 181, 48, 129, 158, 162, 22, 4, 20, 192, 49, 82, 205, 90, 80, 195, 130, 124, 116, 113, 206, 203, 233, 156, 249, 122, 235, 130, 226, 24, 15, 50, 48, 50, 52, 49, 50, 49, 51, 49, 51, 52, 56, 50, 57, 90, 48, 115, 48, 113, 48, 73, 48, 9, 6, 5, 43, 14, 3, 2, 26, 5, 0, 4, 20, 102, 109, 11, 112, 156, 137, 228, 190, 75, 235, 236, 19, 69, 71, 228, 182, 149, 54, 15, 140, 4, 20, 192, 49, 82, 205, 90, 80, 195, 130, 124, 116, 113, 206, 203, 233, 156, 249, 122, 235, 130, 226, 2, 16, 5, 65, 75, 53, 89, 38, 113, 18, 221, 20, 249, 226, 168, 88, 187, 190, 128, 0, 24, 15, 50, 48, 50, 52, 49, 50, 49, 51, 49, 51, 51, 51, 48, 50, 90, 160, 17, 24, 15, 50, 48, 50, 52, 49, 50, 50, 48, 49, 50, 51, 51, 48, 50, 90, 48, 13, 6, 9, 42, 134, 72, 134, 247, 13, 1, 1, 11, 5, 0, 3, 130, 1, 1, 0, 31, 36, 51, 125, 62, 161, 67, 65, 184, 75, 169, 9, 116, 117, 223, 221, 115, 44, 54, 204, 119, 37, 84, 65, 54, 73, 40, 232, 213, 117, 60, 15, 177, 135, 192, 201, 40, 109, 236, 197, 46, 218, 64, 51, 39, 160, 45, 174, 43, 188, 161, 32, 207, 172, 126, 241, 100, 197, 37, 241, 12, 117, 65, 241, 128, 250, 204, 197, 36, 123, 211, 240, 42, 78, 61, 8, 246, 208, 134, 146, 98, 13, 131, 142, 250, 39, 230, 222, 119, 147, 150, 170, 55, 8, 161, 231, 210, 73, 67, 209, 163, 223, 243, 248, 8, 242, 126, 230, 211, 238, 209, 88, 126, 113, 49, 69, 105, 183, 177, 129, 75, 156, 152, 38, 32, 172, 83, 209, 248, 31, 167, 226, 53, 145, 67, 132, 27, 153, 88, 112, 137, 187, 170, 47, 234, 173, 134, 189, 62, 211, 186, 66, 52, 162, 163, 27, 121, 93, 207, 125, 66, 202, 102, 148, 120, 168, 13, 172, 241, 133, 45, 4, 172, 9, 126, 180, 164, 199, 128, 96, 188, 132, 177, 100, 77, 233, 128, 38, 252, 60, 56, 18, 135, 28, 231, 60, 22, 223, 26, 35, 167, 218, 136, 136, 156, 191, 188, 156, 93, 207, 129, 50, 190, 21, 176, 239, 70, 8, 223, 69, 156, 172, 105, 34, 214, 59, 164, 82, 72, 17, 201, 19, 247, 41, 225, 141, 53, 70, 64, 87, 219, 243, 49, 163, 45, 219, 3, 16, 134, 225, 61, 237, 134, 246, 178, 86] DEBUG ureq::stream > created stream: Stream(RustlsStream) DEBUG ureq::unit > sending request GET https://crates.io/api/v1/crates/git-cliff/versions DEBUG ureq::unit > writing prelude: GET /api/v1/crates/git-cliff/versions HTTP/1.1 Host: crates.io User-Agent: ureq/2.12.1 Accept: */* accept-encoding: gzip DEBUG ureq::response > Chunked body in response DEBUG ureq::unit > response 200 to GET https://crates.io/api/v1/crates/git-cliff/versions DEBUG ureq::stream > dropping stream: Stream(RustlsStream) WARN git_cliff > "cliff.toml" is not found, using the default configuration. TRACE git_cliff_core::repo > Upstream URL: https://github.com/teamplayer3/test-release.git DEBUG git_cliff > No GitHub remote is set, using remote: teamplayer3/test-release TRACE git_cliff > Arguments: Opt { help: None, version: None, verbose: 2, init: None, config: "cliff.toml", workdir: None, repository: None, include_path: None, exclude_path: None, tag_pattern: None, with_commit: None, with_tag_message: None, ignore_tags: None, count_tags: None, skip_commit: None, prepend: None, output: None, tag: None, bump: None, bumped_version: false, body: None, latest: false, current: false, unreleased: false, topo_order: false, use_branch_tags: false, no_exec: false, context: false, from_context: None, strip: None, sort: Oldest, range: Some( "init", ), github_token: None, github_repo: None, gitlab_token: None, gitlab_repo: None, gitea_token: None, gitea_repo: None, bitbucket_token: None, bitbucket_repo: None, } TRACE git_cliff > Config: Config { changelog: ChangelogConfig { header: Some( "# Changelog\n\nAll notable changes to this project will be documented in this file.\n\n", ), body: Some( "{% if version %}## [{{ version | trim_start_matches(pat=\"v\") }}] - {{ timestamp | date(format=\"%Y-%m-%d\") }}\n{% else %}## [unreleased]\n{% endif %}{% for group, commits in commits | group_by(attribute=\"group\") %}\n ### {{ group | striptags | trim | upper_first }}\n {% for commit in commits %}\n - {% if commit.scope %}*({{ commit.scope }})* {% endif %}{% if commit.breaking %}[**breaking**] {% endif %}{{ commit.message | upper_first }}{% endfor %}\n{% endfor %}\n\n", ), footer: Some( "\n", ), trim: Some( true, ), render_always: None, postprocessors: Some( [], ), output: None, }, git: GitConfig { conventional_commits: Some( true, ), filter_unconventional: Some( true, ), split_commits: Some( false, ), commit_preprocessors: Some( [], ), commit_parsers: Some( [ CommitParser { sha: None, message: Some( Regex( "^feat", ), ), body: None, footer: None, group: Some( "🚀 Features", ), default_scope: None, scope: None, skip: None, field: None, pattern: None, }, CommitParser { sha: None, message: Some( Regex( "^fix", ), ), body: None, footer: None, group: Some( "🐛 Bug Fixes", ), default_scope: None, scope: None, skip: None, field: None, pattern: None, }, CommitParser { sha: None, message: Some( Regex( "^doc", ), ), body: None, footer: None, group: Some( "📚 Documentation", ), default_scope: None, scope: None, skip: None, field: None, pattern: None, }, CommitParser { sha: None, message: Some( Regex( "^perf", ), ), body: None, footer: None, group: Some( "⚡ Performance", ), default_scope: None, scope: None, skip: None, field: None, pattern: None, }, CommitParser { sha: None, message: Some( Regex( "^refactor", ), ), body: None, footer: None, group: Some( "🚜 Refactor", ), default_scope: None, scope: None, skip: None, field: None, pattern: None, }, CommitParser { sha: None, message: Some( Regex( "^style", ), ), body: None, footer: None, group: Some( "🎨 Styling", ), default_scope: None, scope: None, skip: None, field: None, pattern: None, }, CommitParser { sha: None, message: Some( Regex( "^test", ), ), body: None, footer: None, group: Some( "🧪 Testing", ), default_scope: None, scope: None, skip: None, field: None, pattern: None, }, CommitParser { sha: None, message: Some( Regex( "^chore\\(release\\): prepare for", ), ), body: None, footer: None, group: None, default_scope: None, scope: None, skip: Some( true, ), field: None, pattern: None, }, CommitParser { sha: None, message: Some( Regex( "^chore\\(deps.*\\)", ), ), body: None, footer: None, group: None, default_scope: None, scope: None, skip: Some( true, ), field: None, pattern: None, }, CommitParser { sha: None, message: Some( Regex( "^chore\\(pr\\)", ), ), body: None, footer: None, group: None, default_scope: None, scope: None, skip: Some( true, ), field: None, pattern: None, }, CommitParser { sha: None, message: Some( Regex( "^chore\\(pull\\)", ), ), body: None, footer: None, group: None, default_scope: None, scope: None, skip: Some( true, ), field: None, pattern: None, }, CommitParser { sha: None, message: Some( Regex( "^chore|^ci", ), ), body: None, footer: None, group: Some( "⚙\u{fe0f} Miscellaneous Tasks", ), default_scope: None, scope: None, skip: None, field: None, pattern: None, }, CommitParser { sha: None, message: None, body: Some( Regex( ".*security", ), ), footer: None, group: Some( "🛡\u{fe0f} Security", ), default_scope: None, scope: None, skip: None, field: None, pattern: None, }, CommitParser { sha: None, message: Some( Regex( "^revert", ), ), body: None, footer: None, group: Some( "◀\u{fe0f} Revert", ), default_scope: None, scope: None, skip: None, field: None, pattern: None, }, CommitParser { sha: None, message: Some( Regex( ".*", ), ), body: None, footer: None, group: Some( "💼 Other", ), default_scope: None, scope: None, skip: None, field: None, pattern: None, }, ], ), protect_breaking_commits: None, link_parsers: None, filter_commits: Some( false, ), tag_pattern: None, skip_tags: None, ignore_tags: None, count_tags: None, use_branch_tags: None, topo_order: Some( false, ), sort_commits: Some( "oldest", ), limit_commits: None, }, remote: RemoteConfig { github: Remote { owner: "teamplayer3", repo: "test-release", token: None, is_custom: false, api_url: None, }, gitlab: Remote { owner: "", repo: "", token: None, is_custom: false, api_url: None, }, gitea: Remote { owner: "", repo: "", token: None, is_custom: false, api_url: None, }, bitbucket: Remote { owner: "", repo: "", token: None, is_custom: false, api_url: None, }, }, bump: Bump { features_always_bump_minor: None, breaking_always_bump_major: None, initial_tag: None, custom_major_increment_regex: None, custom_minor_increment_regex: None, bump_type: None, }, } ERROR git_cliff > Git error: `unable to parse OID - contains invalid characters; class=Invalid (3)` ```

Now tried a third time:

  1. creating the git repo first
  2. init a cargo project in it
  3. commit one commit
  4. add a remote repo
  5. git-cliff init

Same problem.

What am I missing?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants