1

I'm tried to access the codecommit packages in my project, But getting given below issue. I tired using this but no use, I don't know how can we resolve it. Thanks in advance

go: module git-codecommit.region/repos/util_service.git: git ls-remote -q origin in D:\workArea\pkg\mod\cache\vcs\a7336f14e81412deff871e645affca79a601f7: exit status 128:
        fatal: unable to connect to git-codecommit.region:
        git-codecommit.region[0: 12.34.56.123]: errno=Unknown error


Golang version 1.20
OS: windows
Editor : VSC
Command: go get git-codecommit.region.amazonaws.com/version/repo/util_service.git
Udayakumar
  • 145
  • 1
  • 1
  • 11
  • go: unrecognized import path "git-codecommit.region/version/repo/util_service": reading https://git-codecommit.region/version/repo/util_service?go-get=1: 401 Unauthorized – Udayakumar Apr 11 '23 at 06:41
  • Have you tried https://stackoverflow.com/a/60687391/1369400? – Zeke Lu Apr 11 '23 at 06:50
  • See https://go.dev/ref/mod#private-module-proxy-direct and https://go.dev/ref/mod#private-module-repo-auth – Zeke Lu Apr 11 '23 at 07:08
  • Try `go get -v git-codecommit.region.amazonaws.com/version/repo/util_service.git` to get verbose output. – Zeke Lu Apr 11 '23 at 07:14
  • Please make sure you have the correct access rights and the repository exists. go: module git-codecommit.region/version/repo/util_service.git: git ls-remote -q origin in D:\workArea\pkg\mod\cache\vcs\a7336f14e81412deff871e645affca79a601f7: exit status 128: fatal: unable to connect to git-codecommit.region: git-codecommit.region[0: 12.34.56.123]: errno=Unknown error – Udayakumar Apr 11 '23 at 07:18
  • Can you `git clone` or `git fetch` this repository on this computer without interactive authentication prompts? – Zeke Lu Apr 11 '23 at 07:20
  • Yes, I can able to clone it (push and pull also works fine) @ZekeLu – Udayakumar Apr 11 '23 at 07:25
  • Does it prompt for username/password when you clone the repository? Have you set the environment variables `GOPRIVATE`? – Zeke Lu Apr 11 '23 at 07:37
  • Let us [continue this discussion in chat](https://chat.stackoverflow.com/rooms/253086/discussion-between-zeke-lu-and-udayakumar). – Zeke Lu Apr 11 '23 at 07:39
  • @ZekeLu now getting this error when I import codecommit repo in my local- error while importing git-codecommit.ap-south-1.amazonaws.com/v1/repos/util_service.git/files: string literal not terminated – Udayakumar Apr 12 '23 at 09:50
  • Hi, I'm in the chat room now. – Zeke Lu Apr 12 '23 at 10:16

0 Answers0