Skip to content

Instantly share code, notes, and snippets.

@s1lvester
s1lvester / fix_github_copilot.sh
Created April 6, 2023 14:16 — forked from sarimarton/fix_github_copilot.sh
Fix Github Copilot in dealing with self-signed certificates
# Fix Github Co-pilot self-signed cert problem
# See: https://github.com/orgs/community/discussions/8866#discussioncomment-3517831
# The script is modified to handle .vscode-server too (in WSL2)
fix_github_copilot() {
patch_ext() {
_VSCODEDIR=$1
_EXTENSIONSPATH="$HOME/${_VSCODEDIR}/extensions"
_RE=$2
_NAME=$3
_COPILOTDIR=$(ls "${_EXTENSIONSPATH}" | grep -E "${_RE}" | sort -V | tail -n1)