Can't access git repository of ubuntu 16.04 LTS from another OS

Cloud

I am newbie in ubuntu and I don't have much experience in ubuntu. Now, I try to setup git server on ubuntu 16.04 LTS by learing this guide https://www.linux.com/learn/how-run-your-own-git-server.

I want to create git repository on ubuntu and I want to access that git repository from windows 7 as remote. In my windows, I already installed msysgit.

But every times I try to add remote, I got fatal errors like this

fatal: '/Project/code_server' does not appear to be a git repository
fatal: Could not read from remote repository.

Please make sure you have the correct access rights
and the repository exists.

I try a lot of way to solve this error more than one days but I can't solve it. I have no idea what I was wrong. So, please guide me. Here is what I've tried.

I want to setup git repository on my ubuntu personal account. So I skip adding a user git step from the above guide.

On my ubuntu personal account, I create git bare repository in the path /opt/lampp/htdocs/Project/code_server by using git init --bare.

(All of the following commands are made by using git bash from windows.)

After that, on my windows laptop, I create ssh key by using git bash like this: ssh-keygen -t rsa without using passphrase. And copy that keys to my ubuntu laptop like this:

$ cat /c/users/my/.ssh/id_rsa.pub | ssh [email protected] "mkdir -p ~/.ssh && cat >> ~/.ssh/authorized_keys"

After that, it shows like this

The authenticity of host '192.168.2.3 (192.168.2.3)' can't be established.
ECDSA key fingerprint is SHA256:CXpg2OJd3KCORAXHu/1zV194iEDElwtRlb8oX6i7X2Q.
Are you sure you want to continue connecting (yes/no)?

so, I said yes and it shows this warning again: Warning: Permanently added '192.168.2.3' (ECDSA) to the list of known hosts. and it ask to write password of ubuntu account and I type the password.

And I change the path to /c/xampp/htdocs/Project/Project-0.3 and make git init and add all code files to version controls and commit.

And then, I try to add remote as shown in below:

my@Pavilion-PC MINGW64 /c/xampp/htdocs/Project/Project-0.3 (master)
$ git remote add origin ssh://[email protected]/Project/code_server

And when I try to push, I got following error.

my@Pavilion-PC MINGW64 /c/xampp/htdocs/Project/Project-0.3 (master)
$ git push origin master
[email protected]'s password:
fatal: '/Attendance/code_server' does not appear to be a git repository
fatal: Could not read from remote repository.

Please make sure you have the correct access rights
and the repository exists.

I already set RSAAuthentication yes and PubkeyAuthentication yes and also remove comment # from AuthorizedKeysFile %h/.ssh/authorized_keys.

But the problem still exists and I can't still work with remote git repository of ubuntu from winodws. I'm very appreciate for any helps.

Jakuje

Nope. You should add a right path when using git remote add:

git remote add origin ssh://[email protected]:/opt/lampp/htdocs/Project/code_se‌​rver

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related

From Dev

Can't upgrade ubuntu server from 10.04 LTS to 12.04 LTS

From Dev

Can't upgrade ubuntu server from 10.04 LTS to 12.04 LTS

From Dev

Can't boot/access Ubuntu LTS 18.04 after erasing Windows

From Dev

Can't access certain sites on Ubuntu 16.04 LTS

From Dev

Can't boot/access Ubuntu LTS 18.04 after erasing Windows

From Dev

The following packages have unmet dependencies: can't install any software. Ubuntu 16:04

From Dev

Can't git clone openshift repository on Ubuntu machine

From Dev

Can't git clone openshift repository on Ubuntu machine

From Java

Git pull from another repository

From Dev

Can't shutdown and logout from top panel in Ubuntu 14.04 LTS

From Dev

Can't shutdown and logout from top panel in Ubuntu 14.04 LTS

From Dev

OS X Server - bot can't get source from repository

From Dev

Symfony can't access entity repository from Listener

From Dev

Can't Clone Git Repository

From Dev

Ubuntu 14.04 LTS can not access internet

From Dev

Can't upgrade Ubuntu 18.04 LTS -> Ubuntu 20.04 LTS

From Dev

Git repository references code from another git repository

From Dev

Cannot connect to Ubuntu LTS from another network

From Dev

How can I add another repository in git?

From Dev

How To access local repository git from another mac connected to local network

From Dev

can not access local HTTPS site from another PC on Ubuntu 16.4

From Dev

Ubuntu 16.04 LTS, internet connection doesn't work, but network still can access machine

From Dev

Ubuntu 16.04 LTS, internet connection doesn't work, but network still can access machine

From Dev

Can I move my Ubuntu 18.04.1 LTS OS to my SSD? (From HD)

From Dev

Ubuntu latest LTS is now released, why can't I upgrade from previous LTS? And how can I force the upgrade?

From Dev

Git pull from another repository without history

From Dev

Allow access to git repository from a certain commit

From Dev

Allow access to git repository from a certain commit

From Dev

Can't install Ubuntu 17.04 LTS

Related Related

  1. 1

    Can't upgrade ubuntu server from 10.04 LTS to 12.04 LTS

  2. 2

    Can't upgrade ubuntu server from 10.04 LTS to 12.04 LTS

  3. 3

    Can't boot/access Ubuntu LTS 18.04 after erasing Windows

  4. 4

    Can't access certain sites on Ubuntu 16.04 LTS

  5. 5

    Can't boot/access Ubuntu LTS 18.04 after erasing Windows

  6. 6

    The following packages have unmet dependencies: can't install any software. Ubuntu 16:04

  7. 7

    Can't git clone openshift repository on Ubuntu machine

  8. 8

    Can't git clone openshift repository on Ubuntu machine

  9. 9

    Git pull from another repository

  10. 10

    Can't shutdown and logout from top panel in Ubuntu 14.04 LTS

  11. 11

    Can't shutdown and logout from top panel in Ubuntu 14.04 LTS

  12. 12

    OS X Server - bot can't get source from repository

  13. 13

    Symfony can't access entity repository from Listener

  14. 14

    Can't Clone Git Repository

  15. 15

    Ubuntu 14.04 LTS can not access internet

  16. 16

    Can't upgrade Ubuntu 18.04 LTS -> Ubuntu 20.04 LTS

  17. 17

    Git repository references code from another git repository

  18. 18

    Cannot connect to Ubuntu LTS from another network

  19. 19

    How can I add another repository in git?

  20. 20

    How To access local repository git from another mac connected to local network

  21. 21

    can not access local HTTPS site from another PC on Ubuntu 16.4

  22. 22

    Ubuntu 16.04 LTS, internet connection doesn't work, but network still can access machine

  23. 23

    Ubuntu 16.04 LTS, internet connection doesn't work, but network still can access machine

  24. 24

    Can I move my Ubuntu 18.04.1 LTS OS to my SSD? (From HD)

  25. 25

    Ubuntu latest LTS is now released, why can't I upgrade from previous LTS? And how can I force the upgrade?

  26. 26

    Git pull from another repository without history

  27. 27

    Allow access to git repository from a certain commit

  28. 28

    Allow access to git repository from a certain commit

  29. 29

    Can't install Ubuntu 17.04 LTS

HotTag

Archive