2012-02-18 4 views
3

最新のバージョンSourceTreeをGitを使用するGoogle Codeプロジェクトで使用しようとしています。Google CodeプロジェクトでSourceTreeを認証する

git push -v --tags --set-upstream origin master:master
Pushing to [project]
fatal: remote error: Invalid username/password.
You may need to use your generated googlecode.com password; see https://code.google.com/hosting/settings
Completed with errors, see above

私はどこかの設定でパスワードを入力する場所を見ることができない。問題は、私は変更をプッシュしようとすると、それは認証文句を言うことです。 Atlassain's knowledge baseとGoogleを検索してみましたが、関連するものが見つかりませんでした。唯一の手掛かりは言うGoogleのプロジェクトページから来ている:

For Git repositories, you can add the following line to your .netrc file recording your password for each repository domain you have commit access to. Make sure you have set the permissions on .netrc so that only your user account can read it.

machine code.google.com login [email] password [password]

を私はSourceTreeの最新バージョンにアップグレードした後、この問題が開始しました:

Option 1: Get a local copy of the [project] repository with this command:
git clone [project]
To push your changes, authenticate with your Google Account and your generated googlecode.com password.
Option 2: Stay authenticated with .netrc:
Add the following to your .netrc.
machine code.google.com login [email] password [generated googlecode.com password]
Make sure the clone URL doesn't contain your username: git clone [url]

another Google page氏は述べているもあります。 GUIに認証の詳細を入力できる場所はありますか?私は古いバージョンにはGUIオプションがあると思いますが、もうそれを見つけることはできません。私が見つけた唯一の場所は、リポジトリの詳細タブまたはメインの環境設定の[一般]タブに類似のものを入力できる場所です。ただし、どちらの場合も、パスワードではなく電子メールアドレスのみを要求します。

答えて

14

問題は、デフォルトでGoogleが(.git/configでは)「USER @」部分を含むURLを使用するように指示することです。 SourceTreeはこれを認識し、UsernameはURLのユーザーであり、パスワードがないことを前提としています。問題を解決するには、URLの「USER @」部分を削除するだけです。次に、変更を押すと、SourceTreeはユーザー名/パスワードの入力を求めます。

https://[email protected]/p/PROJECT/

使用:の代わりに、例えば

https://code.google.com/p/PROJECT/

詳細情報については、以下を参照してください。https://answers.atlassian.com/questions/36585/entering-in-a-password-in-sourcetree

+0

これはデフォルトの動作である正当な理由があるのでしょうか? –