我想将我的项目推送至Google代码。如何在Windows 7上配置GIT以将项目推送至Google代码
我创建了一个新的项目,在选项卡中我有几个说明如何推我的本地代码。
我在Windows 7上工作,所以我创建了一个目录
C:\googlecode
,我把有文件
_netrc
和内部
machine code.google.com login [email protected] password MySecretCodeHere
从那以后,我增加了新的系统变量(对不起,我用的是非英文版的Windows)
HOME
我点击OK,OK。
依照指示操作,我克隆此回购:
git clone https://path/to/repo
我添加了一个新的README文件
touch README
git add *
git commit -m "README"
git push origin master
,在这里我得到了一个错误:
fatal: remote error: Invalid username/password.
You may need to use your generated googlecode.com password; see https://code.goo
gle.com/hosting/settings
更重要的是我应该做些什么来使其工作?
我重新启动我的电脑,我运行命令SET HOME
我复制git-credential-netrc
文件driectory;
C:\Users\Aleksander\Documents\googlemagic
经过:
然后,我去我的回购协议diectory和我运行一个命令
git config credential.helper netrc -d -v
它打印输出:
usage: git config [options]
Config file location
--global use global config file
--system use system config file
--local use repository config file
-f, --file <file> use given config file
--blob <blob-id> read config from given blob object
Action
--get get value: name [value-regex]
--get-all get all values: key [value-regex]
--get-regexp get values for regexp: name-regex [value-regex]
--replace-all replace all matching variables: name value [value_rege
x]
--add add a new variable: name value
--unset remove a variable: name [value-regex]
--unset-all remove all matches: name [value-regex]
--rename-section rename section: old-name new-name
--remove-section remove a section: name
-l, --list list all
-e, --edit open an editor
--get-color <slot> find the color configured: [default]
--get-colorbool <slot>
find the color setting: [stdout-is-tty]
Type
--bool value is "true" or "false"
--int value is decimal number
--bool-or-int value is --bool or --int
--path value is a path (file or directory name)
Other
-z, --null terminate values with NUL byte
--includes respect include directives on lookup
我试图修改这个命令行,但没有任何结果。我尝试添加
'$shortname -f netrc'
或更改选项-d -v
但后来,我也没有输出。
命令:git config credential.helper "netrc -d -v"
工作。下面的输出:
嗨,谢谢你的回答。我试图按照你的指示,但我无法用* git config ... *来完成步骤。我编辑了我的帖子,我写了,我做了什么。 – ruhungry
@IWillTryToCode它尝试引用(我编辑了我的答案)。为什么显示'%PATH%'时有太多空格? – VonC
快速回答您的问题:我只是想让它更清晰可见......已编辑。 – ruhungry