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.

can't clone gists

See original GitHub issue

I followed the API and apparently I can’t clone gists.

This is my code:

await git.clone({
  fs,
  dir: '/tmp/test',
  ref: 'master',
  url: 'https://gist.github.com/f55e5fc30238c672621f56aba653904c.git'
})

It does clone the gist repo but only populates it with the .git directory. I could then git.pull to get the file too but that’s not how cloning works.

If I use the isomorphic-git repo address as url it works as expected.

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:16 (14 by maintainers)

github_iconTop GitHub Comments

1reaction
jcubiccommented, Jun 2, 2018

In chrome you can’t even use XHR to set user-agent. I’ve delete fetch before including isomorphic-git so it get xhr instead of fetch and I’ve got error request.js:194 Refused to set unsafe header "user-agent".

Will set up my proxy to include that user-agent. thanks for the tip.

1reaction
burningTygercommented, May 27, 2018

great, works as expected now. Thank you.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Forking and cloning gists - GitHub Docs
If you want to make local changes to a gist and push them up to the web, you can clone a gist and...
Read more >
How to clone a Github Gist via SSH protocol? - Stack Overflow
Yes, it is possible: git clone git@github.com:5834862.git. Just replace with your own Gist ID of course.
Read more >
Working Copy Users' guide
When cloning repositories from BitBucket and GitHub you can enter your credentials to get a list of repositories to clone. Working Copy tries...
Read more >
Manage projects hosted on GitHub | IntelliJ IDEA Documentation
You can clone a repository that you want to contribute to directly from IntelliJ IDEA and create a new project based on it....
Read more >
Clone a Git repository in Visual Studio - Microsoft Learn
If you haven't interacted with the Git menu before, you might see Clone instead of Clone Repository. If so, select Clone. And, if...
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