LZN's Blog CodePlayer

【solved, git&github】first move to push my project

2015-09-06
LZN
   

Try to push paperhub project on Lab server to github. The following are steps and barriers when I did this.

  1. create a new repo on github, same name as “paperhub”

  2. Try one file down_enw.php

$git init # to regard paperhub dir as a git repo
$git add down_enw.php
$git commit -m "first commit"
$git push origin master

Get error:

$ git push origin master
error: The requested URL returned error: 403 Forbidden while accessing https://github.com/Novarizark/paperhub.git

fatal: HTTP request failed

Follow this:

http://jim-y.me/linux/2015/04/01/setting-up-git-for-error-403-forbidden/ http://stackoverflow.com/questions/7438313/pushing-to-git-returning-error-code-403-fatal-http-request-failed

Change:

$vi .git/config
url = https://Novarizark@github.com/Novarizark/paperhub.git
:wq

Another error:

(gnome-ssh-askpass:29241): Gtk-WARNING **: cannot open display:

Follow this: http://stackoverflow.com/questions/16077971/git-push-produces-gtk-warning#

unset SSH_ASKPASS

Done!


Similar Posts

Comments