INTO-CPS-Association / DTaaS

:factory: :left_right_arrow: :busts_in_silhouette: Digital Twin as a Service
https://into-cps-association.github.io/DTaaS/
Other
116 stars 57 forks source link

git push doesnt work on vscode terminal #1003

Closed aryanbhosale closed 3 weeks ago

aryanbhosale commented 1 month ago

After staging/committing I try to git push my changes to my repo, but that doesnt work The first time it asks to open an authorization link, which when opened says "ERROR", subsequently it doesnt ask for opening the auth url and just runs forever

To Reproduce

Steps to reproduce the behavior:

  1. git add
  2. git commit -m "message"
  3. git push

Expected behavior

Should successfully push the updated code

Workaround

  1. (type -p wget >/dev/null || (sudo apt update && sudo apt-get install wget -y)) \
    && sudo mkdir -p -m 755 /etc/apt/keyrings \
    && wget -qO- https://cli.github.com/packages/githubcli-archive-keyring.gpg | sudo tee /etc/apt/keyrings/githubcli-archive-keyring.gpg > /dev/null \
    && sudo chmod go+r /etc/apt/keyrings/githubcli-archive-keyring.gpg \
    && echo "deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/githubcli-archive-keyring.gpg] https://cli.github.com/packages stable main" | sudo tee /etc/apt/sources.list.d/github-cli.list > /dev/null \
    && sudo apt update \
    && sudo apt install gh -y
  2. sudo apt update sudo apt install gh

  3. in the terminal: gh auth login

  4. After the SSH/HTTPS option, choose the personal access token option when prompted and paste your personal access token in the terminal

It works after this

prasadtalasila commented 3 weeks ago

@aryanbhosale this authorization flow is very specific to GitHub. Even GitHub supports SSH key / HTTP token. There no plans to add this extra feature at the moment. But thanks for the suggestion.