Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

103
Views
How do I fix issue with Git and pdfmake-chinese font?

I am currently using the 方正黑体简体.TTF font included in pdfmake-chinese library. I already tested it when printing PDFs and the Chinese fonts are displayed correctly. Right now, I want to push my Javascript file that contains the vfs_fonts.js but I'm getting an issue from Git with this particular message, "[ERROR] Tier 1 secret(s) found in file '/example.js' - check lines [57318]" when I try to commit this file. If I tried to remove 方正黑体简体.TTF in vfs_fonts.js and used Roboto instead, I can commit and push the example.js. What is the cause of the issue and how should I fix this without compromising security?

Edit: I checked and I have something like secrets dictionary in my configuration. Below are the rules considered as tier 1.

  • BEGIN RSA PRIVATE KEY

  • BEGIN DSA PRIVATE KEY

  • BEGIN EC PRIVATE KEY

  • BEGIN OPENSSH PRIVATE KEY

  • BEGIN PRIVATE KEY

  • PuTTY-User-Key-File-2

  • BEGIN SSH2 ENCRYPTED PRIVATE KEY

  • BEGIN PGP PRIVATE KEY BLOCK

  • (A3T[A-Z0-9]|AKIA|AGPA|AIDA|AROA|AIPA|ANPA|ANVA|ASIA)[A-Z0-9]{16}

about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

That error message looks like something from a commit hook you have set up which is looking for accidentally committed password, security keys, etc. Some sequence of bytes in the font file happens to look similar to a security key, so is accidentally triggering the check.

If the hook is correctly configured, it should ignore binary files, so the fix is to use a gitattributes file to mark .ttf files as binary. Specifcally, a file in the root of your repository called .gitattributes containing this:

*.ttf binary

If that does not fix it, you will have to look for the documentation of the particular script that generated the error, and see how to configure files it should ignore.

about 4 years ago · Juan Pablo Isaza Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!