Enviar a Git devolviendo el código de error 403 fatal: falló la solicitud HTTP
Pude clonar una copia de este repositorio a través de HTTPS autenticado. He hecho algunas confirmaciones y quiero volver al servidor de GitHub. Usando Cygwin en Windows 7 x64.
C:\cygwin\home\XPherior\Code\lunch_call>git push
Password:
error: The requested URL returned error: 403 while accessing https://MichaelDrog
[email protected]/derekerdmann/lunch_call.git/info/refs
fatal: HTTP request failed
También configurarlo con el modo detallado. Todavía estoy bastante desconcertado.
C:\cygwin\home\XPherior\Code\lunch_call>set GIT_CURL_VERBOSE=1
C:\cygwin\home\XPherior\Code\lunch_call>git push
Password:
* Couldn't find host github.com in the _netrc file; using defaults
* About to connect() to github.com port 443 (#0)
* Trying 207.97.227.239... * 0x23cb740 is at send pipe head!
* Connected to github.com (207.97.227.239) port 443 (#0)
* successfully set certificate verify locations:
* CAfile: C:\Program Files (x86)\Git/bin/curl-ca-bundle.crt
CApath: none
* SSL connection using AES256-SHA
* Server certificate:
* subject: 2.5.4.15=Private Organization; 1.3.6.1.4.1.311.60.2.1.3=US; 1.
3.6.1.4.1.311.60.2.1.2=California; serialNumber=C3268102; C=US; ST=California; L
=San Francisco; O=GitHub, Inc.; CN=github.com
* start date: 2011-05-27 00:00:00 GMT
* expire date: 2013-07-29 12:00:00 GMT
* subjectAltName: github.com matched
* issuer: C=US; O=DigiCert Inc; OU=www.digicert.com; CN=DigiCert High Ass
urance EV CA-1
* SSL certificate verify ok.
> GET /derekerdmann/lunch_call.git/info/refs?service=git-receive-pack HTTP/1.1
User-Agent: git/1.7.4.3282.g844cb
Host: github.com
Accept: */*
Pragma: no-cache
< HTTP/1.1 401 Authorization Required
< Server: nginx/1.0.4
< Date: Thu, 15 Sep 2011 22:44:41 GMT
< Content-Type: text/plain
< Connection: keep-alive
< Content-Length: 55
< WWW-Authenticate: Basic realm="GitHub"
<
* Ignoring the response-body
* Expire cleared
* Connection #0 to host github.com left intact
* Issue another request to this URL: 'https://[email protected]/dereker
dmann/lunch_call.git/info/refs?service=git-receive-pack'
* Couldn't find host github.com in the _netrc file; using defaults
* Re-using existing connection! (#0) with host github.com
* Connected to github.com (207.97.227.239) port 443 (#0)
* 0x23cb740 is at send pipe head!
* Server auth using Basic with user 'MichaelDrogalis'
> GET /derekerdmann/lunch_call.git/info/refs?service=git-receive-pack HTTP/1.1
Authorization: Basic XXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
User-Agent: git/1.7.4.3282.g844cb
Host: github.com
Accept: */*
Pragma: no-cache
< HTTP/1.1 401 Authorization Required
< Server: nginx/1.0.4
< Date: Thu, 15 Sep 2011 22:44:41 GMT
< Content-Type: text/plain
< Connection: keep-alive
< Content-Length: 55
* Authentication problem. Ignoring this.
< WWW-Authenticate: Basic realm="GitHub"
* The requested URL returned error: 401
* Closing connection #0
* Couldn't find host github.com in the _netrc file; using defaults
* About to connect() to github.com port 443 (#0)
* Trying 207.97.227.239... * 0x23cb740 is at send pipe head!
* Connected to github.com (207.97.227.239) port 443 (#0)
* successfully set certificate verify locations:
* CAfile: C:\Program Files (x86)\Git/bin/curl-ca-bundle.crt
CApath: none
* SSL re-using session ID
* SSL connection using AES256-SHA
* old SSL session ID is stale, removing
* Server certificate:
* subject: 2.5.4.15=Private Organization; 1.3.6.1.4.1.311.60.2.1.3=US; 1.
3.6.1.4.1.311.60.2.1.2=California; serialNumber=C3268102; C=US; ST=California; L
=San Francisco; O=GitHub, Inc.; CN=github.com
* start date: 2011-05-27 00:00:00 GMT
* expire date: 2013-07-29 12:00:00 GMT
* subjectAltName: github.com matched
* issuer: C=US; O=DigiCert Inc; OU=www.digicert.com; CN=DigiCert High Ass
urance EV CA-1
* SSL certificate verify ok.
* Server auth using Basic with user 'MichaelDrogalis'
> GET /derekerdmann/lunch_call.git/info/refs HTTP/1.1
Authorization: Basic xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
User-Agent: git/1.7.4.3282.g844cb
Host: github.com
Accept: */*
Pragma: no-cache
* The requested URL returned error: 403
* Expire cleared
* Closing connection #0
error: The requested URL returned error: 403 while accessing https://MichaelDrog
[email protected]/derekerdmann/lunch_call.git/info/refs
fatal: HTTP request failed
Estas son las versiones de git y curl que tengo:
C:\Users\XPherior>git --version
git version 1.7.4.msysgit.0
C:\Users\XPherior>curl --version
curl 7.21.7 (amd64-pc-win32) libcurl/7.21.7 OpenSSL/0.9.8r zlib/1.2.5
Protocols: dict file ftp ftps gopher http https imap imaps ldap pop3 pop3s rtsp
smtp smtps telnet tftp
Features: AsynchDNS GSS-Negotiate Largefile NTLM SSL SSPI libz
30 answers
Acabo de tener el mismo problema y acabo de averiguar cuál es la causa.
Github parece que solo admite la forma ssh de leer y escribir el repositorio, aunque la forma https también muestra 'Leer y escribir'.
Así que necesitas cambiar tu configuración de repo en tu PC a ssh:
- editar
.git/config
archivo en su directorio repo - buscar
url=
entrada en la sección[remote "origin"]
- cambio de
url=https://[email protected]/derekerdmann/lunch_call.git
aurl=ssh://[email protected]/derekerdmann/lunch_call.git
. es decir, cambiar todos los textos antes del símbolo@
assh://git
- Guardar
config
archive y salga. ahora puedes usargit push origin master
para sincronizar tu repositorio en GitHub
Warning: date(): Invalid date.timezone value 'Europe/Kyiv', we selected the timezone 'UTC' for now. in /var/www/agent_stack/data/www/ajaxhispano.com/template/agent.layouts/content.php on line 61
2013-01-08 23:25:49
Para poder iniciar sesión definitivamente usando el protocolo https
, primero debe establecer su credencial de autenticación a la URI remota de git :
git remote set-url origin https://[email protected]/user/repo.git
Entonces se te pedirá una contraseña cuando intentes git push
.
De hecho, esto está en el formato de autenticación http. También puedes establecer una contraseña:
https://youruser:[email protected]/user/repo.git
Debe tener en cuenta que si hace esto, su contraseña de github se almacenará en texto plano en su .directorio git, que es obviamente indeseable.
Warning: date(): Invalid date.timezone value 'Europe/Kyiv', we selected the timezone 'UTC' for now. in /var/www/agent_stack/data/www/ajaxhispano.com/template/agent.layouts/content.php on line 61
2014-01-28 00:32:40
Una pequeña adición a La respuesta de Sean .
En lugar de editar el archivo .git/config
manualmente, puede usar el comando git remote set-url
.
En su caso debe ser:
git remote set-url origin ssh://[email protected]/derekerdmann/lunch_call.git
Me resulta más fácil y más limpio, que jugar con archivos de puntos.
Warning: date(): Invalid date.timezone value 'Europe/Kyiv', we selected the timezone 'UTC' for now. in /var/www/agent_stack/data/www/ajaxhispano.com/template/agent.layouts/content.php on line 61
2017-05-23 11:47:32
Editar .git/config
archivo en su directorio repo
Buscar url=
entrada en la sección [remote "origin"]
Cámbialo de url=https://github.com/rootux/ms-Dropdown.git
a
https://[email protected]/rootux/ms-Dropdown.git
Donde USERNAME
es tu nombre de usuario de github
Warning: date(): Invalid date.timezone value 'Europe/Kyiv', we selected the timezone 'UTC' for now. in /var/www/agent_stack/data/www/ajaxhispano.com/template/agent.layouts/content.php on line 61
2014-02-21 22:05:55
Las otras respuestas que sugieren cambiar a SSH se equivocan. HTTPS es compatible, pero debes iniciar sesión con tu contraseña de GITHUB, no con tu frase de contraseña SSH (que era lo que me estaba dando el mismo error exacto).
Estaba teniendo el mismo problema, pero asegurándome de usar mi contraseña de GitHub real en el mensaje de contraseña de terminal arreglé la solución sin alterar la configuración, o recurriendo a SSH.
La razón por la que es importante tener en cuenta esto, es que muchos las instituciones (como mi escuela) bloquearán SSH, pero permitirán HTTPS (que es la única razón por la que empecé a clonar a través de HTTPS en primer lugar).
Espero que eso ayude a cualquier otra persona que tenga el mismo problema...
Warning: date(): Invalid date.timezone value 'Europe/Kyiv', we selected the timezone 'UTC' for now. in /var/www/agent_stack/data/www/ajaxhispano.com/template/agent.layouts/content.php on line 61
2012-01-17 17:27:28
Mismo error y resolución en Mac OS X.
Todo estaba funcionando bien hasta que creé una nueva cuenta en GitHub y traté de empujar
$ git push -u origin master
Y obtuvo el error:
remoto: Permiso para NEWUSER / NEWREPO.git denegado a OLDUSER. fatal: no se puede acceder a " https://github.com/NEWUSER/NEWREPO.git/': El error devuelto por la URL solicitada: 403
Debería haberse fijado estableciendo el user.name ya sea para global o corriente repo
$ git config –-global user.name NEWUSER
$ git config user.name NEWUSER
Pero no lo hizo.
Lo arreglé eliminando el OLDUSER asociado con GitHub de la aplicación Keychain Access en la sección Contraseñas. Entonces el comando push fue exitoso.
$ git push -u origin master
Warning: date(): Invalid date.timezone value 'Europe/Kyiv', we selected the timezone 'UTC' for now. in /var/www/agent_stack/data/www/ajaxhispano.com/template/agent.layouts/content.php on line 61
2016-05-01 20:24:28
Creo que @deepwaters obtuvo la respuesta correcta para versiones anteriores. La URL HTTPS debe tener el nombre de usuario. Tenía git 1.7.0.4 y git push origin master
ni siquiera pediría una contraseña hasta que la agregara.
Warning: date(): Invalid date.timezone value 'Europe/Kyiv', we selected the timezone 'UTC' for now. in /var/www/agent_stack/data/www/ajaxhispano.com/template/agent.layouts/content.php on line 61
2012-06-27 14:44:36
Esto funciona para mí -:
git remote set-url origin https://[email protected]/user/repo.git
Espero que ayude
Warning: date(): Invalid date.timezone value 'Europe/Kyiv', we selected the timezone 'UTC' for now. in /var/www/agent_stack/data/www/ajaxhispano.com/template/agent.layouts/content.php on line 61
2015-12-17 21:56:04
Actualiza tu git. GitHub ha respondido a esta pregunta en https://help.github.com/articles/error-the-requested-url-returned-error-403 .
Warning: date(): Invalid date.timezone value 'Europe/Kyiv', we selected the timezone 'UTC' for now. in /var/www/agent_stack/data/www/ajaxhispano.com/template/agent.layouts/content.php on line 61
2012-06-20 19:03:40
Un código 403 está "Prohibido". El servidor vio su solicitud y la rechazó. ¿Tiene permiso para enviar a ese repositorio?
Warning: date(): Invalid date.timezone value 'Europe/Kyiv', we selected the timezone 'UTC' for now. in /var/www/agent_stack/data/www/ajaxhispano.com/template/agent.layouts/content.php on line 61
2011-09-16 00:32:12
En realidad tenía una solución muy simple para esto. Todo lo que hice fue editar el archivo de configuración de git de manera diferente después de clonar el repositorio. La url de origen remota es lo que necesita editar en su archivo predeterminado config. Debería verse como se ve a continuación
[core]
repositoryformatversion = 0
filemode = true
bare = false
logallrefupdates = true
[remote "origin"]
fetch = +refs/heads/*:refs/remotes/origin/*
url = https://*username*@github.com/*username*/*repository*.git
[branch "master"]
remote = origin
merge = refs/heads/master
Warning: date(): Invalid date.timezone value 'Europe/Kyiv', we selected the timezone 'UTC' for now. in /var/www/agent_stack/data/www/ajaxhispano.com/template/agent.layouts/content.php on line 61
2015-10-13 23:00:12
Lo descubrí. Cloné a través de HTTPS. Configurando mis claves públicas SSH, clonando sobre SSH, y empujando sobre SSH lo arreglé.
Warning: date(): Invalid date.timezone value 'Europe/Kyiv', we selected the timezone 'UTC' for now. in /var/www/agent_stack/data/www/ajaxhispano.com/template/agent.layouts/content.php on line 61
2011-09-16 03:29:40
Simplemente agregue su nombre de usuario a la url de esta manera : https://[email protected]/islam9/bootstrap-rtl
Por favor, compruebe: http://islamkhalil.wordpress.com/2012/12/06/github-error-pushing-to-git-returning-error-code-403-fatal/
Warning: date(): Invalid date.timezone value 'Europe/Kyiv', we selected the timezone 'UTC' for now. in /var/www/agent_stack/data/www/ajaxhispano.com/template/agent.layouts/content.php on line 61
2012-12-06 18:37:21
- Haga clic en su repositorio
- En el lado derecho, haga clic en "Configuración"
- En el panel de opciones del lado izquierdo, haga clic en"Colaboradores"
- Agrega el nombre de la persona que conoces en GitHub
- Haga clic en"Agregar colaboradores"
Después de esto, nuestro "Push to Git" funcionó bien.
Warning: date(): Invalid date.timezone value 'Europe/Kyiv', we selected the timezone 'UTC' for now. in /var/www/agent_stack/data/www/ajaxhispano.com/template/agent.layouts/content.php on line 61
2016-09-02 00:31:16
Si está utilizando Windows, a veces esto puede suceder porque Windows almacena las credenciales para el repositorio externo (en nuestro caso github) en su propio almacenamiento. Y las credenciales guardadas allí pueden ser diferentes de las que necesita en este momento.
Así que para evitar este problema, simplemente encuentra github en este almacenamiento y elimina las credenciales guardadas. Después de esto, mientras empujas git solicitará tus credenciales y te permitirá empujar.
Warning: date(): Invalid date.timezone value 'Europe/Kyiv', we selected the timezone 'UTC' for now. in /var/www/agent_stack/data/www/ajaxhispano.com/template/agent.layouts/content.php on line 61
2018-04-18 07:34:40
Para cualquier persona curiosa, mi máquina mac vs vm lucid ejecutó git 1.7.6 vs 1.7.0.4, y el mismo repositorio fue empujable desde mi mac (git más reciente) pero no la VM
La misma versión de curl. ¿Tal vez algunas versiones más antiguas de Git no admiten push https?
Warning: date(): Invalid date.timezone value 'Europe/Kyiv', we selected the timezone 'UTC' for now. in /var/www/agent_stack/data/www/ajaxhispano.com/template/agent.layouts/content.php on line 61
2012-03-05 23:49:54
Me enfrenté al mismo error y la causa fue estúpida: no tenía privilegios para confirmar en el repositorio seleccionado. No sabía que tenía que
- fork selected project first
- clonar repositorio localmente
- confirmar mis cambios localmente
- enviar cambios a mi clon de github
- request pull request to upstream
Como se describe en https://help.github.com/categories/63/articles
Warning: date(): Invalid date.timezone value 'Europe/Kyiv', we selected the timezone 'UTC' for now. in /var/www/agent_stack/data/www/ajaxhispano.com/template/agent.layouts/content.php on line 61
2014-03-02 14:54:28
Agregue el nombre de usuario como parte de la URL y este error ocurre porque el comando git está golpeando http en lugar de https. Así que establece la url
git remote set-url origin https://<username>@github.com/Path_to_repo.git
Después de lo cual se le pedirá la contraseña:
Warning: date(): Invalid date.timezone value 'Europe/Kyiv', we selected the timezone 'UTC' for now. in /var/www/agent_stack/data/www/ajaxhispano.com/template/agent.layouts/content.php on line 61
2016-03-05 15:11:27
Lo que funcionó para mí:
Mi repositorio era un fork y todavía estaba vinculado al repositorio de los padres.
git remote -v
Le dirá si es su repositorio o no.
git remote set-url origin https://github.com/USERNAME/OTHERREPOSITORY.git
Le permite reconfigurarlo en su repositorio y luego permitirle empujar.
Warning: date(): Invalid date.timezone value 'Europe/Kyiv', we selected the timezone 'UTC' for now. in /var/www/agent_stack/data/www/ajaxhispano.com/template/agent.layouts/content.php on line 61
2016-08-26 18:22:10
Para aquellos que tienen permiso denegado 403 error al usar ssh(de acuerdo con Xiao) o http urls pruebe estos comandos
>git config --global --unset-all credential.helper
>git config --unset-all credential.helper
Con derechos de administrador
>git config --system --unset-all credential.helper
Warning: date(): Invalid date.timezone value 'Europe/Kyiv', we selected the timezone 'UTC' for now. in /var/www/agent_stack/data/www/ajaxhispano.com/template/agent.layouts/content.php on line 61
2017-05-23 12:10:45
Cámbialo de
url=https://[email protected]/derekerdmann/lunch_call.git
A
url=ssh://[email protected]/derekerdmann/lunch_call.git
Funciona!
No olvides el "git" antes del "@".
Warning: date(): Invalid date.timezone value 'Europe/Kyiv', we selected the timezone 'UTC' for now. in /var/www/agent_stack/data/www/ajaxhispano.com/template/agent.layouts/content.php on line 61
2012-10-18 01:16:36
Descubrí mi propia variación de este problema.
El problema no era cambiar el protocolo de https a ssl, sino, configurar el nombre de usuario y correo electrónico global de Github! (Yo estaba tratando de empujar a un repositorio privado.
git config --global user.email "[email protected]"
git config --global user.name "Your full name"
Warning: date(): Invalid date.timezone value 'Europe/Kyiv', we selected the timezone 'UTC' for now. in /var/www/agent_stack/data/www/ajaxhispano.com/template/agent.layouts/content.php on line 61
2014-02-17 21:08:37
Github tiene una página dedicada a solucionar este error:
Https://help.github.com/articles/https-cloning-errors
En mi caso resultó que usar una nueva versión de git (1.8.5.2) resolvió este problema.
Warning: date(): Invalid date.timezone value 'Europe/Kyiv', we selected the timezone 'UTC' for now. in /var/www/agent_stack/data/www/ajaxhispano.com/template/agent.layouts/content.php on line 61
2014-09-27 13:23:34
Tuve este problema en este momento, y resultó que mi servidor /etc/resolver.el archivo conf tenía una dirección ip incorrecta. Podría ayudar a otros.
Warning: date(): Invalid date.timezone value 'Europe/Kyiv', we selected the timezone 'UTC' for now. in /var/www/agent_stack/data/www/ajaxhispano.com/template/agent.layouts/content.php on line 61
2012-08-29 11:57:46
Esto me sucedió porque mi compañero de trabajo deshabilitó accidentalmente el repositorio desde el que se bifurcó este repositorio. Solo puede comprobar para asegurarse de que el repositorio original de git(hub) todavía existe.
Warning: date(): Invalid date.timezone value 'Europe/Kyiv', we selected the timezone 'UTC' for now. in /var/www/agent_stack/data/www/ajaxhispano.com/template/agent.layouts/content.php on line 61
2012-12-04 16:34:24
Podría ser un problema contable. La cuenta de Github del propietario del repo (privado) puede no ser financiera. He visto esto donde la tarjeta de crédito del cliente expiró.
Warning: date(): Invalid date.timezone value 'Europe/Kyiv', we selected the timezone 'UTC' for now. in /var/www/agent_stack/data/www/ajaxhispano.com/template/agent.layouts/content.php on line 61
2013-05-07 00:01:18
Lo que funcionó para mí es cambiar de http a ssh:
git remote rm origin
git remote add origin [email protected]:username/repoName.git
Luego compruébalo con git remote -v
Warning: date(): Invalid date.timezone value 'Europe/Kyiv', we selected the timezone 'UTC' for now. in /var/www/agent_stack/data/www/ajaxhispano.com/template/agent.layouts/content.php on line 61
2014-01-22 09:59:17
Tuve el mismo problema. Mi caso fue: Inicialicé git repo localmente antes de crearlo en github, luego intenté agregar rama remota. Resolví mi problema cambiando el orden de las acciones: creé un repositorio en el sitio de github, luego lo inicié localmente. Pero no es el caso fr ellos que les gusta hacer todo desde la línea de comandos como yo.
Warning: date(): Invalid date.timezone value 'Europe/Kyiv', we selected the timezone 'UTC' for now. in /var/www/agent_stack/data/www/ajaxhispano.com/template/agent.layouts/content.php on line 61
2014-02-15 20:09:13
Después de cambiar https a http dentro de la aplicación gitbox, funcionó para mí.
Warning: date(): Invalid date.timezone value 'Europe/Kyiv', we selected the timezone 'UTC' for now. in /var/www/agent_stack/data/www/ajaxhispano.com/template/agent.layouts/content.php on line 61
2014-03-10 19:13:44
A veces no hay nada malo con la configuración, y hay algunos problemas en los servidores de github.
Https://status.github.com - estado actual de github :)
Warning: date(): Invalid date.timezone value 'Europe/Kyiv', we selected the timezone 'UTC' for now. in /var/www/agent_stack/data/www/ajaxhispano.com/template/agent.layouts/content.php on line 61
2014-04-01 23:23:39