question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

CodeCommit clone issue

See original GitHub issue

I have 2 issues when trying to clone from AWS codecommit repos. First issue is the GitRemoteHTTP.discover and GitRemoteHTTP.connect are appending .git to the urls. I’ve seen other issues reported where this is required so not sure how to handle that.

The second issues is the following error:

TypeError: Cannot read property 'replace' of undefined
    at Object.clone (/Users/kyleparisi/lambdas3/node_modules/isomorphic-git/dist/for-node/isomorphic-git/index.js:2939:13)
    at <anonymous>

I tried investigating this second issue and was not successful in understanding the issue. What I gather is that the response from codecommit is not working in retrieving the packfile. This is the response I get from curling the discover route:

001e# service=git-upload-pack
00000099de3e3cae168df55f271122dbed0420d5a0595b5b HEAD�multi_ack_detailed shallow side-band-64k thin-pack allow-tip-sha1-in-want allow-reachable-sha1-in-want
003fde3e3cae168df55f271122dbed0420d5a0595b5b refs/heads/master
0000

Any ideas what might be broken?

Reference material: curling a public github repo

001e# service=git-upload-pack
0000010874a142ff37b557f9c7c89d93b6cac0f12f756ebd HEAD�multi_ack thin-pack side-band side-band-64k ofs-delta shallow deepen-since deepen-not deepen-relative no-progress include-tag multi_ack_detailed no-done symref=HEAD:refs/heads/master agent=git/github-g5c70ccf6530b
003c38ed6dacd102add6c2b2adcb9ea5d273aae57929 refs/heads/7.1
003c5ec2a63336da891a78c87f0ef260bd1b8dd8d3d3 refs/heads/7.2
003f74a142ff37b557f9c7c89d93b6cac0f12f756ebd refs/heads/master
0000

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:20 (11 by maintainers)

github_iconTop GitHub Comments

2reactions
kyleparisicommented, Jun 14, 2018

Maybe future major version can drop support. I think user provided in clone url is best bet.

1reaction
kyleparisicommented, Jun 14, 2018

Confirmed working via

    await git.clone({
      fs,
      dir: path.join(__dirname, "tmp"),
      url,
      ref: 'master',
      singleBranch: true,
      depth: 1,
      // new option:
      noGitSuffix: true
    });
Read more comments on GitHub >

github_iconTop Results From Across the Web

Connect to an AWS CodeCommit repository
When you connect to a CodeCommit repository for the first time, you typically clone its contents to your local machine. You can also...
Read more >
clone AWS codecommit repo via HTTP - Stack Overflow
I was able to git clone in a folder where my user has read and write access(my user) via Terminal, so isn't permission...
Read more >
Not able to clone a codecommit repository - AWS re:Post
I followed these steps to get access to codecommit but i'm not able to clone repositories. 1. Install latest pip and git-remote-codecommit 2....
Read more >
Troubleshooting 3 AWS CodeCommit Config “Gotchas”
There may be a few issues that cause 403s on the initial clone (despite ensuring that your credentials are set correctly).
Read more >
Use git-remote-codecommit to Clone AWS ... - QloudX
Up until March 2020, the only way to connect to AWS CodeCommit repositories was to create an IAM user, generate Git credentials for...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found