Skip to content

msentwickler/btpcflogin

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

SAP BTP Cloud Foundry Login Helper

This Node.js project makes it easier to login to the SAP BTP Cloud Foundry environment with the command line interface cf in Linux. You can find more information and installation instructions about the cf cli at https://docs.cloudfoundry.org/cf-cli/install-go-cli.html.

After installation you can use the shell command btpcflogin to get a guided login to the platform.

Installation

This project should run on every Linux platform. It is implemented and tested with WSL2 - Ubuntu. Therefore it should run also in headless environments.

Install as shell command from npm:

npm i -g btpcflogin

Run from source:

  1. Clone git repo and cd into cloned repo
  2. npm i
  3. npm run local

Install as shell command from source:

  1. Clone git repo and cd into cloned repo
  2. npm i
  3. npx tsc
  4. npm i -g

Prerequisites

Node.js runtime 14 or higher.

A git installation to clone the repo.

This project uses pass as credential store. To use this login helper you have to install and setup pass in your Linux environment.

You have to tell the helper which pass entries should be used for login. To do so, you have to create a config file named btpcflogin.json in ~/.config/configstore/ with the following structure. You can specify more than one login inside the array []. You have to specify the full relative path to the file (as printed by pass show).

{
    "passLogins": [
        "S0123456789",
        "/my-company/cloud/S0123456789"
    ]
}

It is assumed that the login data is stored in the following format in a pass file:

<password of SAP S-user>
username: <e-mail of SAP S-user>

To read the username the first 10 characters of the second line are ignored.

Bonus

Now that you have setup pass as a secure password manager, you can use it also as a credential store for your git remotes. Have a look at this project: languitar/pass-git-helper

About

Easy login to SAP BTP Cloud Foundry (cf cli) in Linux

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 100.0%