質問をすることでしか得られない、回答やアドバイスがある。

15分調べてもわからないことは、質問しよう!

新規登録して質問してみよう
ただいま回答率
85.48%
Git

Gitはオープンソースの分散バージョン管理システム(DVCS)です。

GitLab

GitLabは Gitoliteをブラウザから管理できるようにする Rubyアプリケーションで、 GitHubのようなサービスをクローズドな環境に独自で構築できるように 公開されたものです。

Q&A

解決済

2回答

6971閲覧

gitlabにpushしたいのですがpassword入力で弾かれます。

taketakekaho

総合スコア13

Git

Gitはオープンソースの分散バージョン管理システム(DVCS)です。

GitLab

GitLabは Gitoliteをブラウザから管理できるようにする Rubyアプリケーションで、 GitHubのようなサービスをクローズドな環境に独自で構築できるように 公開されたものです。

2グッド

0クリップ

投稿2018/07/02 14:45

編集2018/07/02 14:46

git初心者です。
以下の流れでgitlabにpushしたいのですがpassword入力で弾かれます。
これはGitlabにログインするときの自分のアカウントのパスワードなのでしょうか?

$ git config --global user.name "hogehoge" $ git config --global user.email "hogehoge@example-jp.com" $ git clone git@gitlab.hoge.huge:piyo/repository-test.git Cloning into 'repository-test'... The authenticity of host 'gitlab.hoge.huge (xxx.xxx.xxx.xxx)' can't be established. RSA key fingerprint is SHA256:xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx. Are you sure you want to continue connecting (yes/no)? yes Warning: Permanently added 'gitlab.hoge.huge,xxx.xxx.xxx.xxx' (RSA) to the list of known hosts. git@gitlab.hoge.huge's password: Permission denied, please try again. git@gitlab.hoge.huge's password: Permission denied, please try again. git@gitlab.hoge.huge's password: git@gitlab.hoge.huge: Permission denied (publickey,gssapi-keyex,gssapi-with-mic,password). fatal: Could not read from remote repository. Please make sure you have the correct access rights and the repository exists. $ git remote add origin git@gitlab.hoge.huge:piyo/repository-test.git $ git add . $ git commit [master (root-commit) a224fef] my first commit 13 files changed, 292252 insertions(+) create mode 100644 .funcpack/index.gen.js create mode 100644 .funcpack/index.js create mode 100644 .funcpack/messages/function.json create mode 100644 .gitignore create mode 100644 PostDeployScripts/prepareSrc.cmd create mode 100644 PostDeployScripts/runGulp.cmd create mode 100644 README.md create mode 100644 host.json create mode 100644 messages/.vscode/launch.json create mode 100644 messages/function.json create mode 100644 messages/index.js create mode 100644 messages/package-lock.json create mode 100644 messages/package.json $ git push -u origin master git@gitlab.hoge.huge's password: Permission denied, please try again. git@gitlab.hoge.huge's password: Permission denied, please try again. git@gitlab.hoge.huge's password: git@gitlab.hoge.huge: Permission denied (publickey,gssapi-keyex,gssapi-with-mic,password). fatal: Could not read from remote repository. Please make sure you have the correct access rights and the repository exists.
ykcz, Hiroshis👍を押しています

気になる質問をクリップする

クリップした質問は、後からいつでもMYページで確認できます。

またクリップした質問に回答があった際、通知やメールを受け取ることができます。

バッドをするには、ログインかつ

こちらの条件を満たす必要があります。

guest

回答2

0

ベストアンサー

git clone git@gitlab.hoge.huge:piyo/repository-test.git
で、Pushしたい場合はSSH公開鍵認証にしましょう。

パスワード認証は、
https://gitlab.hoge.huge/piyo/repository-test.git
でしか使えません。
CentOS 6のデフォルトのGit 1.7.1は古いのでhttps認証はうまくいかなかったような気がします。

パスワード認証したい場合は、以下のようにCloneしましょう。
git clone https://gitlab.hoge.huge/piyo/repository-test.git

この辺見てください。
authentication - Git push requires username and password - Stack Overflow
https://stackoverflow.com/questions/6565357/git-push-requires-username-and-password

投稿2018/07/03 01:01

編集2018/07/03 01:04
TeeTeeRuu

総合スコア48

バッドをするには、ログインかつ

こちらの条件を満たす必要があります。

taketakekaho

2018/07/17 15:27

なるほど!どうやら公開鍵登録が間違っていたようで再度登録し直した所うまくPushできました! httpsとSSHどちらも使い方同じだと思っていたのですが認証方式が違うのですね…色々ググってみましたがそもそもの前提知識がなかったため大変助かりました。 ありがとうございます!mm
guest

0

はいそうですね。
GitHubのパスワードを入力します。

投稿2018/07/02 15:39

happy_teeth

総合スコア42

バッドをするには、ログインかつ

こちらの条件を満たす必要があります。

taketakekaho

2018/07/02 16:44

gitlabのログインパスワードは絶対に合ってるのに弾かれる理由などおわかりでしょうか…?
y_waiwai

2018/07/02 21:51

> Permission denied なんで、パスワード違いではないような気がしますが
happy_teeth

2018/07/03 00:02 編集

ユーザー名はあっていますでしょうか? git config -l のコマンドで remote.origin.url=https://github.com/[user_name]/[project_name] が出てくると思います。 pushするときには、そこのuser_nameを記載します。
taketakekaho

2018/07/17 15:23

回答頂きありがとうございます! git config -l 今までconfigファイルをviで開く方法しか知らずコマンド初めて知りました!助かります! 打ってみましたがgithubとgitlabではちょっと違う?のかuser_nameは含まれないような… remote.origin.url=git@gitlab.hoge.huge:piyo/repository-test.git どうやら公開鍵登録が間違っていたようで色々いじってみた所うまくPushできました! 全然慣れず困っていたので大変助かりました。ありがとうございます!
guest

あなたの回答

tips

太字

斜体

打ち消し線

見出し

引用テキストの挿入

コードの挿入

リンクの挿入

リストの挿入

番号リストの挿入

表の挿入

水平線の挿入

プレビュー

15分調べてもわからないことは
teratailで質問しよう!

ただいまの回答率
85.48%

質問をまとめることで
思考を整理して素早く解決

テンプレート機能で
簡単に質問をまとめる

質問する

関連した質問