2

I'm connected to (university's) remote server via ssh command. I want to push upstream data to remote git repository from that server. I'm trying to do it only via https (ssh keys aren't set).

I'm trying to do it by command: git push -u https://gitlab.com/username/reponame.git master but GitLab doesn't even ask me about my credentials (repository is private so I would expect some authorization).

How can I do it?

EDIT: (sorry for delay, but due to too many ssh connections, I was kicked from university network)

Responses to comments:

@Salman: git remote show origin doesn't work

(without set origin: fatal: 'origin' does not appear to be a git repository),

(with origin set to git@gitlab.com:username/reponame.git - error ssh: connect to host gitlab.com port 22: Connection timed out)

@sajib khan: I get following error: fatal: unable to access 'https://gitlab.com/username/reponame.git/': Failed to connect to gitlab.com port 443: Connection timed out

franiis
  • 1,378
  • 1
  • 18
  • 33

1 Answers1

0

Failed to connect to gitlab.com port 443: Connection timed out

That should be a proxy issue, as described here.
This is typical when you don't have direct internet access but must set a proxy first.

Community
  • 1
  • 1
VonC
  • 1,262,500
  • 529
  • 4,410
  • 5,250
  • Thank you, but I don't have cached any wrong credentials (in ```git config -l```) – franiis Feb 26 '17 at 15:39
  • @franiis OK, I have rewritten the answer to address your actual error message. – VonC Feb 26 '17 at 15:44
  • Looks like it's my problem. I'll try to get proxy info and set it and if it work, I'll accept this answer. Thank you. – franiis Feb 26 '17 at 16:18