Giter VIP home page Giter VIP logo

octokit-auth-netrc's Introduction

octokit-auth-netrc

.netrc auth plugin for Octokit

Codecov Node CI Workflow Status

Table of Contents

Usage

MIT license npm Try octokit-auth-netrc on RunKit node

Installation

$ npm install octokit-auth-netrc --save-prod

Defining your token

Add a personal access token to your ~/.netrc file

machine api.github.com
  login <personal access token here>

machine github.acme-inc.com
  login <personal access token here>

Example

Import

import {createNetrcAuth} from './lib/index.cjs';

Authenticate

/*defaults to api.github.com*/
const auth = createNetrcAuth();

/*For use with GHES, override the default domain*/
const enterpriseAuth = createNetrcAuth({ domain: 'github.acme-inc.com' });

(async () => {
  await auth();
  await enterpriseAuth();
})();

API

createNetrcAuth

Returns an auth() function after reading your token from the ~/.netrc file. Throws an error with code ENONETRCTOKEN when an entry for api.github.com is not found in the ~/.netrc file.

Contributing

PRs Welcome Conventional Commits Commitizen friendly semantic-release Renovate

Dependencies

$ nvm install
$ npm install

Verification

$ NODE_OPTIONS=--no-experimental-fetch npm test

octokit-auth-netrc's People

Contributors

dependabot[bot] avatar renovate-bot avatar renovate[bot] avatar travi avatar trevtrich avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar

octokit-auth-netrc's Issues

Action Required: Fix Renovate Configuration

There is an error with this repository's Renovate configuration that needs to be fixed. As a precaution, Renovate will stop PRs until it is resolved.

Error type: undefined. Note: this is a nested preset so please contact the preset author if you are unable to fix it yourself.

The automated release is failing 🚨

🚨 The automated release from the master branch failed. 🚨

I recommend you give this issue a high priority, so other packages depending on you can benefit from your bug fixes and new features again.

You can find below the list of errors reported by semantic-release. Each one of them has to be resolved in order to automatically publish your package. I’m sure you can fix this πŸ’ͺ.

Errors are usually caused by a misconfiguration or an authentication problem. With each error reported below you will find explanation and guidance to help you to resolve it.

Once all the errors are resolved, semantic-release will release your package the next time you push a commit to the master branch. You can also manually restart the failed CI job that runs semantic-release.

If you are not sure how to resolve this, here are some links that can help you:

If those don’t help, or if this issue is reporting something you think isn’t right, you can always ask the humans behind semantic-release.


No npm token specified.

An npm token must be created and set in the NPM_TOKEN environment variable on your CI environment.

Please make sure to create an npm token and to set it in the NPM_TOKEN environment variable on your CI environment. The token must allow to publish to the registry https://registry.npmjs.org/.


Good luck with your project ✨

Your semantic-release bot πŸ“¦πŸš€

Dependency Dashboard

This issue lists Renovate updates and detected dependencies. Read the Dependency Dashboard docs to learn more.

Repository problems

These problems occurred while renovating this repository.

  • WARN: Base branch does not exist - skipping

Awaiting Schedule

These updates are awaiting their schedule. Click on a checkbox to get an update now.

  • chore(deps): lock file maintenance (master)

Edited/Blocked

These updates have been manually edited so Renovate will no longer make changes. To discard all commits and start over, click on a checkbox.

Ignored or Blocked

These are blocked by an existing closed PR and will not be recreated unless you click a checkbox below.

Detected dependencies

github-actions
.github/workflows/node-ci.yml
  • actions/checkout v3@ac593985615ec2ede58e132d2e21d2b1cbd6127c
  • actions/setup-node v3@64ed1c7eab4cce3362f8c340dee64e5eaeef8f7c
  • codecov/codecov-action v3@d9f34f8cd5cb3b3eb79b3e4b5dae3a16df499a70
  • actions/checkout v3@ac593985615ec2ede58e132d2e21d2b1cbd6127c
  • actions/setup-node v3@64ed1c7eab4cce3362f8c340dee64e5eaeef8f7c
npm
package.json
  • @octokit/auth-token ^3.0.0
  • netrc 0.1.4
  • @babel/register 7.21.0
  • @cucumber/cucumber 9.0.0
  • @octokit/core 4.2.0
  • @travi/any 2.1.8
  • @travi/babel-preset 3.0.96
  • @travi/eslint-config 3.0.24
  • @travi/eslint-config-cucumber 1.0.6
  • @travi/eslint-config-mocha 1.0.19
  • ban-sensitive-files 1.9.18
  • c8 7.13.0
  • chai 4.3.7
  • commitlint-config-travi 1.4.25
  • cross-env 7.0.3
  • cz-conventional-changelog 3.3.0
  • debug 4.3.4
  • gherkin-lint 4.2.2
  • http-status-codes 2.2.0
  • husky 8.0.3
  • lockfile-lint 4.10.1
  • ls-engines 0.9.0
  • mocha 10.2.0
  • mock-fs 5.2.0
  • nock 13.3.0
  • npm-run-all 4.1.5
  • package-preview 4.0.0
  • remark-cli 11.0.0
  • remark-preset-lint-travi 5.0.0
  • remark-toc 8.0.1
  • remark-usage 10.0.1
  • rimraf 4.3.0
  • rollup 2.79.1
  • rollup-plugin-auto-external 2.0.0
  • sinon 15.0.1
  • node ^14.15 || >=16
nvm
.nvmrc
  • node 18

  • Check this box to trigger a request for Renovate to run again on this repository

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.