I am using https://github.com/mattn/gist-vim and installing it as a submodule with vim pathogen in my bundle directory.
I have also set
git config --global github.user calvinchengx
git config --global github.token [mysecrettoken]
I am able to get commands such as Gist -l working fine, with this command retrieving a list of gists belong to me. I can also preview other coders' gists with Gist -l [thegithubusername] with no problems.
But I am unable to post a new gist to github. When attempting to post a new gist, I get the following error:
Posting it to gist...
Post failed:
Press ENTER or type command to continue
There isn't any useful error message shown. So I am not exactly what the problem is. Is there a way to find out what my error is (not familiar with debugging vim scripts)?
Appreciate any suggestions!
I tried setting up again after pulling the latest gist-vim but this is the error I get:-
It seems Github has deprecated the v2 of the API where gist creation was made by posting to gist.github.com, now in v3 it has to be done through api.github.com instead, probably some other differences to.
Api docs: http://developer.github.com/v3/#authentication
Similar issue: https://github.com/defunkt/gist/issues/79
Use new gist.vim. If you are using git command, pull master branch.
This include some changes breaking spec. new one don't use github_token. You'll need to setup for instruction to choose basic auth or oauth2. please read README or :help gist-vim.
I've got same error, install WebAPI.vim plugin solve problem
http://www.vim.org/scripts/script.php?script_id=4019
Related
Today, I am following this video https://www.youtube.com/watch?v=RGOj5yH7evk to learn how to use GitHub, but I am using Windows.
I've set it all successfully by also following the official instruction (https://docs.github.com/en/authentication/connecting-to-github-with-ssh/about-ssh) and it works on Git Bash.
enter image description here
But I failed when I tried to "git clone" in Visual Studio Code and got this response:
git#github.com: Permission denied (publickey).
fatal: Could not read from remote repository.
I've also tried setting the config because the video mentioned config (although the official instructions does't mention this, which means Windows users don't need to care about this. But this was what I tried to solve the problem, just in case this could make influence on my problem)
file:C:/Users/CC2022/.gitconfig user.name=CC
file:C:/Users/CC2022/.gitconfig user.email=username#email.com
file:C:/Users/CC2022/.gitconfig core.editor='C:\Users\CC2022\AppData\Local\Programs\Microsoft VS Code/Code.exe' -multiInst -notabbar -nosession -noPlugin
So, is there any requirement for the folder I select to open in VS code to do the git stuff or where is the problem?
Thank you for your help
I can git clone by the HTTP link on both VS code and GitBash, or git clone by the SSH link on Git Bash.
But I have a problem (git clone by SSH link) on VS Code.
In addition, although git clone by HTTP link on VS Code is okay, but I cannot "push" edited files back to GitHub, because the access is denied
That means the repository you are trying to push back to is not one you own/have created. You might therefore have no right to contribute back to it directly.
I updated a pre-existing vuepress documentation, which runs and works as expected when delopyed on localhost:8080/, however once I push the updates to gh hub pages it does not display correctly.
code i use to deploy:
set -e
npm run docs:build
cd docs/.vuepress/dist
git init
git add -A
git commit -m "Deploy documentation"
git push-f git#github.com:NAME/REPO.git master:gh-pages
I have no error messages durning run time or deploy.
But when I check the actual documentation on github, it displays funny. and the links do not work.... as when I check the pages dev eniroment on the console 404 errors appear... it seems that there might be something wrong with the dist.js files in assets....
Not sure how to fix this...please help. Thx!
Images 1: Displays black blocks
Images 2 Error in the dev console
(I have no errors messages durning build only in the console)
I think you may want to double-check if you have set the base correctly.
Check out the documentation site about deploy to GitHub pages and Config Reference -> base
If this doesn't solve your problem, can you post more detail about your code? Or maybe a repo?
I don't seem to be able to connect to a Github private repo with Eclipse.
I am able to connect to the repo through the command line on windows by using mysysgit with putty (Pageant), without the need to provide login/password. Is use this article and it works LINKE.
Eclipse does recognize my git repo, but when I right click and pull/push, nothing really happens: it's says it's pulling 0% in the eclipse status bar, but it doesn't change...
I have added the ssh private/pub key to the eclipse pref I followed the helpful links in this post, but not having a lot of luck.
When adding the github repo through the import and searching, I do get the error shown in the screenshot :
And when I add the private repo through the Eclipse import uri, I get also an error, see screenshot (using git protocol):
I also tried the https protocol, but then get the following error:
I tried many things as you can find these errors with Google, but didn't manage to solve it :(
I am using putty Pageant, and that works on the command line. But in the github help I read that github doesn't work with Putty, but in my case it does :(...
Any idea how to solve this?
EDITED:
I just noticed that a pull request does work, but it take like 10 min to end, while it costs 10s on the command line. Any idea?
Regarding ssh, you would need to configure Egit in order to show where your pubic/private keys are: Eclipse SSH Configuration
If you are using plink/pagent keys (instead of openssh ones), see "Using putty's pagent with egit in Eclipse".
Regarding https, many causes can prevent to access a remote repo: anti-virus, JVM, certificates issue, ...
I tried to follow the instructions in this article:
http://developer.cloudbees.com/bin/view/DEV/GitHub+Commit+Hooks+HOWTO
But I have two problems:
It doesn't work. When I push to github nothing happens on the jenkins side. On Jenkins the GitHub Hook log says 'Polling has not run yet.'
The possible cause for this is that I can't specify the git repository as described in this image:
There is no textfield for a public key, nor the other fields. Instead I have the fields
Repository URL, Name, Refspec
Also I can specify a http url (and everything but the triggering works). But if I specify the git/ssh url as in the image I get the following error:
Failed to connect to repository : Command "git ls-remote -h
git#github.com:schauder/degraph.git HEAD" returned status code 128:
stdout: stderr: Warning: Permanently added
'github.com,207.97.227.239' (RSA) to the list of known hosts.
Permission denied (publickey). fatal: Could not read from remote
repository.
Please make sure you have the correct access rights and the repository
exists.
I copied the url from github so a typo is somewhat unlikely.
I verified that I have the github plugin installed (upgraded to version 1.5)
Any hints how to fix or at least debug the problem?
Update answering questions in the comments:
Yes I checked the checkbox 'Build when a change is pushed to GitHub' in the job configuration.
And Yes I setup the webhook in GitHub. When I click the test button there, nothing happens. When I put the url from the webhook in my browser I get a http 500 saying
Not intended to be browsed interactively (must specify payload parameter)
Plus some lengthy stacktrace.
Another Update
I checked the GIT related plugins installed on the Jenkins side. Everything showing their with GIT in the text is installed and at the most current version
Based on Git error message above, I assume you can't be authenticated. Did you add the CloudBees public SSH key on GitHub as described here?
Clarification by OP
The image referenced in the question seemed to suggest that one puts a public key from GitHub into CloudBees. But actually it is the other way round, and also all the labels seem to be changed, so it is kind of difficult to match that screenshot to what you see in CloudBees.
So what I did is this:
in the Job configuration at Cloudbees there is a Public Key (generated by CloudBee). I it in the CloudBees DEV#cloud Authorization section and labeled CloudBees Public Key. Copy that Key.
Hop over to GitHub and go to Settings > Deploy Keys. Add the key there.
go to Settings > Service Hooks > WebHook URLs. Click on the test button. You are not going to see much on the GitHub side.
Hop back to CloudBees Jenkins. From the main page of the job go to the ´GitHub Hook Log´. There you should see something like:
Started on Mar 15, 2013 8:55:14 AM
Using strategy: Default
[poll] Last Built Revision: Revision 581acde89a62317fd8dabaa3f4c6025d1c9dd413 (origin/master)
Fetching changes from the remote Git repositories
Polling for changes in
Done. Took 0.34 sec
Changes found
And your job should start.
If the last line says No Changes this means the hook worked, but you already build the current version so the build is not triggered again.
If you still have problems, have look at https://wiki.jenkins-ci.org/display/JENKINS/Github+Plugin#GitHubPlugin-TriggerabuildwhenachangeispushedtoGitHub under 'trouble shooting' it tells you how to set up logging on the jenkins side. With this I get all kind of stuff in the Jenkins SystemLog.
I've just published a tutorial on continuous integration for Play applications hosted on GitHub using CloudBees. This is intended to provide a comprehensive guide:
http://ics-software-engineering.github.io/play-example-continuous-integration/
I was checking bespin documentation and I found this
https://wiki.mozilla.org/Labs/Bespin/DesignDocs/VCSIntegration
Here it says bespin can connect mercurial, svn and git. But I could not find those commands in bespin (I am using it from https://bespin.mozillalabs.com/). I am spesifically trying to find a way to connect bespin to github, so I can have free online code editing solution. Did anybody else tried that? or is it possible.
I found a bespin plugin
http://bespinplugins.mozillalabs.com/plugins/20
unfortunaltely it only fetches gists (gist.github.com) not whole git project.
I am just quoting from here.
Actually, Bespin already handles
that... "vcs getkey" will generate a
keypair for you and give you your
public key to install on
GitHub/bitbucket/wherever. It's mostly
a matter of being able to tell git
where to find the private key. hg
actually has a command line option
that lets you specify the ssh command
to run. I believe we'll need to set
environment variables with git and
svn.
Edit: Also, a plugin you may find handy.