0

Im trying to clone a repository from CodeCommit, but it brings me another repository all the time... when i do "git remote -v" I see the repository that Im getting and not the one I want.

I tried adding the repository I want to clone to the remote by doing "git remote add master https://path" and i see it being added with the other repository

    master  https://git-codecommit.eu-west-1.path (fetch)
master  https://git-codecommit.eu-west-1.path (push)
origin  https://git-codecommit.path (fetch)
origin  https://git-codecommit.path (push)

I tried deleting the not wanted repository "git remote remove origin" but it says "fatal: No such remote: 'origin'"

tried removing git and restarting pc ...nothing worked can anyone help?

C:\Users\vadnu>git config --list
core.symlinks=false
core.autocrlf=true
core.fscache=true
color.diff=auto
color.status=auto
color.branch=auto
color.interactive=true
help.format=html
rebase.autosquash=true
remote.origin.url=https://git-codecommit.eu-west-1.amazonaws.com/v1/repos/ServiceCryGateway
credential.helper=!aws --profile CodeCommitProfile codecommit credential-helper $@
credential.usehttppath=true
http.sslcainfo=C:/Program Files/Git/mingw64/ssl/certs/ca-bundle.crt
http.sslbackend=openssl
diff.astextplain.textconv=astextplain
filter.lfs.clean=git-lfs clean -- %f
filter.lfs.smudge=git-lfs smudge --skip -- %f
filter.lfs.process=git-lfs filter-process --skip
filter.lfs.required=true
credential.helper=manager
user.name=vad
user.email=vad@zobit.com
credential.usehttppath=true
Vadim Has
  • 37
  • 4
  • Did you try any of the answers from here: https://stackoverflow.com/questions/16330404/how-to-remove-remote-origin-from-git-repo – wcarhart Sep 05 '19 at 20:10
  • Possible duplicate of [How to remove remote origin from Git repo](https://stackoverflow.com/questions/16330404/how-to-remove-remote-origin-from-git-repo) – LeGEC Sep 05 '19 at 22:16
  • Has someone pulled a stupid prank on you and set one of the url-rewriting config options behind your back? add the results of `git config --list` to the question please, and also show the exact command you're using to clone. – jthill Sep 06 '19 at 00:51
  • added the response from the git config --list I run "git clone https://git-codecommit.eu-west-1.amazonaws.com/v1/repos/ServiceCryGateway – Vadim Has Sep 08 '19 at 07:42
  • Okay, so the origin url shown in the config matches the url from your clone. The simplest way I can think of to produce the symptoms from your original question is, you're running them in the wrong repo. It's not credible that `git remote show` would show a url that doesn't match the configured url, that's just too simple to get wrong like that. – jthill Sep 14 '19 at 16:37

0 Answers0