0

cross posting the discussion post: https://github.com/github/feedback/discussions/7955

I've seen this: #4151.

It requires having Visual Studio locally. For me, it defeats the purpose of having codespaces.

I tried a workaround in the form of adding my ADO repo as a remote. Here's the sanitized git log:

> git remote add ado https://<organization>@dev.azure.com/<organization>/<project>/_git/<repository>
> git status -z -u
> git symbolic-ref --short HEAD
> git for-each-ref --format=%(refname)%00%(upstream:short)%00%(objectname)%00%(upstream:track) refs/heads/feature/tf-static-web-site refs/remotes/feature/tf-static-web-site
> git for-each-ref --sort -committerdate --format %(refname) %(objectname) %(*objectname)
> git remote --verbose
> git config --get commit.template
> git fetch ado
> git config --local branch.feature/tf-static-web-site.github-pr-owner-number
fatal: Authentication failed for 'https://dev.azure.com/<organization>/<project>/_git/<repository>/'

There doesn't seem to be a way for me to add my ADO git credentials to the codespace. I've tried creating a credentials store via git config --global credential.helper store and then doing a git pull but the username/password prompt never shows up.

Is this something I'm doing wrong or maybe there's some sort of Ubuntu permissions thing I'm screwing up or is there something baked into the codespaces image that prevents this sort of operation?

The real question is what kind of steps do I need to take in order to add my ADO repo as a remote to a codespaces vscode?

ton.yeung
  • 4,793
  • 6
  • 41
  • 72
  • Did you tried generating git credientals and use them to clone repos. – Anirudha Gupta Nov 21 '21 at 03:50
  • @AnirudhaGupta I'm not sure I understand. You're saying I should generate git credentials in ADO, and then clone it where? How would cloning the the repo help me add a remote to codespaces? – ton.yeung Nov 21 '21 at 15:32
  • Try this https://stackoverflow.com/a/10054470/713789 – Anirudha Gupta Nov 22 '21 at 02:25
  • @AnirudhaGupta that clones the repo but doesn't add it as a remote. Also in order to spin up a codespace an existing github repo has to be created first. So a repo already exist in codespaces' vscode. – ton.yeung Nov 22 '21 at 13:57
  • Did you get any solution on this ? – Kaku Jan 18 '22 at 11:44

0 Answers0