Skip to content

🚀 Feature: Allow base64 for GitHub private key #7732

Closed

Description

@byawitz

🔖 Feature description

Give the option to provide the GitHub private key in base 64 format, which could be in some extra env variable.

_APP_VCS_GITHUB_PRIVATE_KEY=
_APP_VCS_GITHUB_PRIVATE_KEY_BASE64=YWZhZWZhZWFmYWVmYWVhZmFlZmFlYWZ.....

🎤 Pitch

This will make it easy to enter that key in one line.

👀 Have you spent some time to check if this issue has been raised before?

  • I checked and didn't find similar issue

🏢 Have you read the Code of Conduct?

Activity

  1. added
    enhancement
    good first issue
    product / platform
    on Mar 20, 2024
  2. mthirumalai2905 commented on Mar 24, 2024

    @mthirumalai2905

    Whats the issue here should we have to add Base64 encryption?

  3. byawitz commented on Mar 25, 2024

    @byawitz
    ContributorAuthor

    Adding a private key in .env files can be annoying as it requires you to remove all new lines, and change it to \n. This way it can be easier.

  4. mthirumalai2905 commented on Mar 29, 2024

    @mthirumalai2905

    Please Have a look into this @byawitz

    //Import atob
    const atob = require('atob');

    // Read the base64 encoded private key from the environment variable
    const githubPrivateKeyBase64 = process.env._APP_VCS_GITHUB_PRIVATE_KEY_BASE64;

    // Decode the base64 encoded string to get the original GitHub private key
    const githubPrivateKey = atob(githubPrivateKeyBase64);

    //ready to use
    console.log('GitHub Private Key:', githubPrivateKey);

  5. HarshMN2345 commented on Sep 15, 2026

    @HarshMN2345
    Member

    Fixed in #13695

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementproduct / platform

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions