Package authentication to github repo is failing

Hi! I’m trying to migrate my yamls to github, and successfully gotten my migrated yaml scratchpad project to compile and work, but only if the repository is public.

Whenever I make it private and attempt to add a username & password (following this), the pre-compile fails with the following error: “could not read Username for ‘https://github.com’: No such device or address”.

Here is the local yaml I am attempting to compile:

packages:
  remote_package:
    url: https://github.com/HeathersZen/PureHarvest
    refresh: 0s
    username: "phgitaccess"
    password: "<REMOVED FOR PRIVACY"
    files:
      - Sources/esphome/components/scratchpad/esphome-scratchpad.yml

Here is the YAML in the repo:

esphome:
  name: "scratchpad"
  friendly_name: scratchpad

esp8266:
  board: esp01_1m

# Enable logging
logger:

# Enable Home Assistant API
api:
  encryption:
    key: "BIGYKjB80JAdhPr5zLIvDAhDEws4ltuZ+Pn4QXifujM="

ota:
  - platform: esphome
    password: "767f4a714ce37e38de6a923efdc821ea"

web_server:
  port: 80
  
wifi:
  ssid: !secret wifi_ssid
  password: !secret wifi_password

  # Enable fallback hotspot (captive portal) in case wifi connection fails
  ap:
    ssid: "W1L1-Controller Fallback Hotspot"
    password: "0b2K6ulVr72K"

captive_portal:

switch:
  - platform: gpio
    pin: 0
    id: Relay1
    icon: "mdi:sprinkler-fire"
    name: Relay1
    inverted: yes
    restore_mode: RESTORE_DEFAULT_OFF

Could someone please point out the proper way to authenticate ESPHome to GitHub?

MANY THANKS!